File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
main/java/com/fishercoder/solutions
test/java/com/fishercoder Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ Your ideas/fixes/algorithms are more than welcome!
117
117
| 504| [ Base 7] ( https://leetcode.com/problems/base-7/ ) | [ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_504.java ) | O(1) | O(1) | Easy|
118
118
|503|[ Next Greater Element II] ( https://leetcode.com/problems/next-greater-element-ii/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/NextGreaterElementII.java ) | O(n) |O(n) | Medium| Stack
119
119
|502|[ IPO] ( https://leetcode.com/problems/ipo/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_502.java ) | O(nlogn) |O(n) | Hard| Heap, Greedy
120
- |501|[ Find Mode in Binary Tree] ( https://leetcode.com/problems/find-mode-in-binary-tree/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/FindModeinBinaryTree .java ) | O(n) |O(k) | Easy| Binary Tree
120
+ |501|[ Find Mode in Binary Tree] ( https://leetcode.com/problems/find-mode-in-binary-tree/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_501 .java ) | O(n) |O(k) | Easy| Binary Tree
121
121
| 500| [ Keyboard Row] ( https://leetcode.com/problems/keyboard-row/ ) | [ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_500.java ) | O(n) | O(1) | Easy|
122
122
|499|[ The Maze III] ( https://leetcode.com/problems/the-maze-iii/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_499.java ) | O(m* n) |O(m* n) | Hard| BFS
123
123
| 496| [ Next Greater Element I] ( https://leetcode.com/problems/next-greater-element-i/ ) | [ Solution] ( ../master/src/main/java/com/fishercoder/solutions/NextGreaterElementI.java ) | O(n* m) | O(1) | Easy|
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ Given a binary search tree with duplicates. You have to find all the mode(s) in
19
19
Note: If a tree has more than one mode, you can return them in any order.
20
20
21
21
*/
22
- public class FindModeinBinaryTree {
22
+ public class _501 {
23
23
24
24
public int [] findMode (TreeNode root ) {
25
25
int [] result = new int []{};
Original file line number Diff line number Diff line change 2
2
3
3
import com .fishercoder .common .classes .TreeNode ;
4
4
import com .fishercoder .common .utils .CommonUtils ;
5
- import com .fishercoder .solutions .FindModeinBinaryTree ;
5
+ import com .fishercoder .solutions ._501 ;
6
6
import org .junit .Before ;
7
7
import org .junit .BeforeClass ;
8
8
import org .junit .Test ;
12
12
/**
13
13
* Created by fishercoder on 1/28/17.
14
14
*/
15
- public class FindModeinBinaryTreeTest {
16
- private static FindModeinBinaryTree test ;
15
+ public class _501Test {
16
+ private static _501 test ;
17
17
private static int [] expected ;
18
18
private static int [] actual ;
19
19
private static TreeNode treeNode ;
20
20
21
21
@ BeforeClass
22
22
public static void setup (){
23
- test = new FindModeinBinaryTree ();
23
+ test = new _501 ();
24
24
}
25
25
26
26
@ Before
You can’t perform that action at this time.
0 commit comments