Binary tree question -
Node has numeric data (int)
The function takes depth as argument and sum all the value
of the node of the depth.
For instance,
(0) depth 0
/ \
10 20 depth 1
/ \ / \
40 50 60 70 depth 2
so if you pass get_sum(2), you would return 220 which is
40+50+60+70 (sum of depth2)
write the function.
No Answer is Posted For this Question
Be the First to Post Answer
In PHP how many size data can upload by default?
9 Answers Classic Infotech, PG Software,
How to send Email using PHP with MySQL in Linux Server?..
Is nan in javascript?
How do I display php errors?
Do you know what is the use of rand() in php?
What are the functions for imap?
Is php object oriented?
Write a program using while loop in php?
How to install PHP with --mcrypt and --mhash?
What is a string in r?
what are interfaces and Abstart classes
How can we destroy the cookie in php?