Skip to content

Files

Latest commit

author
Shoaib Rayeen
Jun 6, 2019
4678772 · Jun 6, 2019

History

History

Sum of All Non-Leaf Node

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 4, 2019
Jun 6, 2019
Jun 6, 2019

Given a binary tree, find the sum of all the Non-leaf nodes.

Input : 
        1
      /   \
     2     3
    / \   / \
   4   5 6   7
          \
           8
Output :
Sum = 1 + 2 + 3 + 6 = 12