File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ Your ideas/fixes/algorithms are more than welcome!
8383|546|[ Remove Boxes] ( https://leetcode.com/problems/remove-boxes/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_546.java ) | O(n^3) |O(n^3) | Hard| DFS, DP
8484|545|[ Boundary of Binary Tree] ( https://leetcode.com/problems/boundary-of-binary-tree/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_545.java ) | O(n) |O(n) | Medium | Recursion
8585|544|[ Output Contest Matches] ( https://leetcode.com/problems/output-contest-matches/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/OutputContestMatches.java ) | O(n) |O(n) | Medium | Recursion
86- |543|[ Diameter of Binary Tree] ( https://leetcode.com/problems/diameter-of-binary-tree/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/DiameterofBinaryTree .java ) | O(n) |O(h) | Easy | Tree/DFS/Recursion
86+ |543|[ Diameter of Binary Tree] ( https://leetcode.com/problems/diameter-of-binary-tree/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_543 .java ) | O(n) |O(h) | Easy | Tree/DFS/Recursion
8787|542|[ 01 Matrix] ( https://leetcode.com/problems/01-matrix/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_542.java ) | O(m* n) |O(n) | Medium | BFS
8888|541|[ Reverse String II] ( https://leetcode.com/problems/reverse-string-ii/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/ReverseStringII.java ) | O(n) |O(1) | Easy | String
8989| 540| [ Single Element in a Sorted Array] ( https://leetcode.com/problems/single-element-in-a-sorted-array/ ) | [ Solution] ( ../master/src/main/java/com/fishercoder/solutions/SingleElementinaSortedArray.java ) | O(n) | O(1) | Medium |
Original file line number Diff line number Diff line change 1616
1717 Note: The length of path between two nodes is represented by the number of edges between them.
1818 */
19- public class DiameterofBinaryTree {
19+ public class _543 {
2020
2121 int diameter = 0 ;
2222 public int diameterOfBinaryTree (TreeNode root ) {
You can’t perform that action at this time.
0 commit comments