You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: leetcode/easy/543_diameter_of_binary_tree.md
+24-15Lines changed: 24 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,26 +18,35 @@ In the perspective of node 1, what do you need?
18
18
- You will need to know what the current longest path found so far from either left or right is.
19
19
- You will also need to know what the longest 'connectable' path is.
20
20
21
-
Connectable path means taking your child's connectable path and connecting it with yourself, hence, creating a long chain.
21
+
Connectable path means taking your child's connectable path and connecting it with yourself, hence, creating a longer chain.
22
22
This is completely separate from the curent longest path.
23
-
You want to know if you can create a longer chain than the current longest path found so far.
23
+
You want to know if you can create a longer chain than the current longest path found so far by adding the node you are currently on and the longest paths from the right and left that also include themselves as part of the chain.
0 commit comments