Leetcode - 1372. Longest ZigZag Path in a Binary Tree
Question / Problem: Leetcode
Solution
class Solution {
int find(TreeNode root, int isLeft, int count){
if(root == null) return count;
if(isLeft == 1)
return Math.max(find(root.right,0,count+1), find(root.left,1,0));
...
dhayalram.hashnode.dev1 min read