public static long leftSum(BinaryTreeNode<Integer> root)
{
/*
Write your code here
*/
long[] arr = new long[1];
findLeftSum(root,arr,false);
return arr[0];
}
public static void findLeftSum(BinaryTreeNode<Integer> root,long[] arr,boolean flag)
{
if(root==null)
return;
if(flag)
arr[0]+=root.data;
findLeftSum(root.left, arr, true);
findLeftSum(root.right, arr, false);
}