Skip to content

Commit e6a976a

Browse files
edit 366
1 parent fab863c commit e6a976a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ Your ideas/fixes/algorithms are more than welcome!
229229
|369|[Plus One Linked List](https://leetcode.com/problems/plus-one-linked-list/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_369.java)| O(n)|O(1) | Medium| Linked List
230230
|368|[Largest Divisible Subset](https://leetcode.com/problems/largest-divisible-subset/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_368.java)| O(n^2)|O(n) | Medium| DP
231231
|367|[Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_367.java)| O(n)|O(1) | Medium|
232-
|366|[Find Leaves of Binary Tree](https://leetcode.com/problems/find-leaves-of-binary-tree/)|[Solution](../master/src/main/java/com/fishercoder/solutions/FindLeavesofBinaryTree.java)| O(n)|O(h) | Medium| DFS
232+
|366|[Find Leaves of Binary Tree](https://leetcode.com/problems/find-leaves-of-binary-tree/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_366.java)| O(n)|O(h) | Medium| DFS
233233
|365|[Water and Jug Problem](https://leetcode.com/problems/water-and-jug-problem/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_365.java)| O(n)|O(1) | Medium| Math
234234
|364|[Nested List Weight Sum II](https://leetcode.com/problems/nested-list-weight-sum-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/NestedListWeightSumII.java)| O(n)|O(h) | Medium| DFS
235235
|362|[Design Hit Counter](https://leetcode.com/problems/design-hit-counter/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_362.java)| O(1) amortized|O(k) | Medium| Design

src/main/java/com/fishercoder/solutions/FindLeavesofBinaryTree.java renamed to src/main/java/com/fishercoder/solutions/_366.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import java.util.ArrayList;
66
import java.util.List;
77

8-
/**Given a binary tree, collect a tree's nodes as if you were doing this: Collect and remove all leaves, repeat until the tree is empty.
8+
/**Given a binary tree, collect a tree's nodes as if you were doing this:
9+
* Collect and remove all leaves, repeat until the tree is empty.
910
1011
Example:
1112
Given binary tree
@@ -31,7 +32,7 @@
3132
Returns [4, 5, 3], [2], [1].
3233
3334
*/
34-
public class FindLeavesofBinaryTree {
35+
public class _366 {
3536

3637
List<List<Integer>> result = new ArrayList<List<Integer>>();
3738
public List<List<Integer>> findLeaves(TreeNode root) {

0 commit comments

Comments
 (0)