GfG QA is closing soon... Please refer PRACTICE or GfG now on wards !!

Binary tree path to sum problem

Given the tree below that can share nodes, check to see if any branch (root to leaf) returns the sum = 50? 

          7  

         /  \  

      8      6  

    /    \   /   \  

  2       3       8  

 /        /   \     

5       4     1 

Note: Node 3 shares 8 and 6

 

asked Apr 25 by anonymous
...