Skip to content

Commit dc63cbf

Browse files
[N-0] refactor 687
1 parent da1d697 commit dc63cbf

File tree

1 file changed

+3
-0
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+3
-0
lines changed

src/main/java/com/fishercoder/solutions/_687.java

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737

3838
public class _687 {
3939
public static class Solution1 {
40+
/**
41+
* Use a one element array to pass in and out is a common technique for handling tree questions.
42+
*/
4043
public int longestUnivaluePath(TreeNode root) {
4144
int[] result = new int[1];
4245
if (root != null) {

0 commit comments

Comments
 (0)