Skip to content

Commit b3fe9af

Browse files
edit 501
1 parent 32c8f2e commit b3fe9af

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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|

src/main/java/com/fishercoder/solutions/FindModeinBinaryTree.java renamed to src/main/java/com/fishercoder/solutions/_501.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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[]{};

src/test/java/com/fishercoder/FindModeinBinaryTreeTest.java renamed to src/test/java/com/fishercoder/_501Test.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.fishercoder.common.classes.TreeNode;
44
import com.fishercoder.common.utils.CommonUtils;
5-
import com.fishercoder.solutions.FindModeinBinaryTree;
5+
import com.fishercoder.solutions._501;
66
import org.junit.Before;
77
import org.junit.BeforeClass;
88
import org.junit.Test;
@@ -12,15 +12,15 @@
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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy