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!
117117| 504| [ Base 7] ( https://leetcode.com/problems/base-7/ ) | [ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_504.java ) | O(1) | O(1) | Easy|
118118|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
119119|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
121121| 500| [ Keyboard Row] ( https://leetcode.com/problems/keyboard-row/ ) | [ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_500.java ) | O(n) | O(1) | Easy|
122122|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
123123| 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
1919 Note: If a tree has more than one mode, you can return them in any order.
2020
2121 */
22- public class FindModeinBinaryTree {
22+ public class _501 {
2323
2424 public int [] findMode (TreeNode root ) {
2525 int [] result = new int []{};
Original file line number Diff line number Diff line change 22
33import com .fishercoder .common .classes .TreeNode ;
44import com .fishercoder .common .utils .CommonUtils ;
5- import com .fishercoder .solutions .FindModeinBinaryTree ;
5+ import com .fishercoder .solutions ._501 ;
66import org .junit .Before ;
77import org .junit .BeforeClass ;
88import org .junit .Test ;
1212/**
1313 * Created by fishercoder on 1/28/17.
1414 */
15- public class FindModeinBinaryTreeTest {
16- private static FindModeinBinaryTree test ;
15+ public class _501Test {
16+ private static _501 test ;
1717 private static int [] expected ;
1818 private static int [] actual ;
1919 private static TreeNode treeNode ;
2020
2121 @ BeforeClass
2222 public static void setup (){
23- test = new FindModeinBinaryTree ();
23+ test = new _501 ();
2424 }
2525
2626 @ Before
You can’t perform that action at this time.
0 commit comments