Driver Code
int main ( ) { Node * root ; root = createNode ( 1 ) ; root -> l = createNode ( 2 ) ; root -> r = createNode ( 3 ) ; root -> l -> l = createNode ( 4 ) ; root -> l -> r = createNode ( 5 ) ; root -> r -> l = createNode ( 6 ) ; root -> r -> r = createNode ( 7 ) ; sumOfNodesAtMaxDepth ( root , 0 ) ; cout << sum ; return 0 ; }