Skip to content

Commit bf25eb0

Browse files
update 199
1 parent 76b1570 commit bf25eb0

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

Diff for: src/main/java/com/fishercoder/solutions/_199.java

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ void rightView(TreeNode curr, List<Integer> result, int currDepth) {
2626
if (currDepth == result.size()) {
2727
result.add(curr.val);
2828
}
29+
//go through right side first as we want right side view, so as soon as we find it, then we won't use the one from left side
2930
rightView(curr.right, result, currDepth + 1);
3031
rightView(curr.left, result, currDepth + 1);
3132
}

0 commit comments

Comments
 (0)