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
How many ways are there for passing variables between pages in PHP and what are they ?
Specify pre-defined classes in php ?
How can we determine whether a variable is set?
What is PHP?
Is array empty php?
What is the use of session and cookies in php?
What happens when submit button is clicked?
How can php and javascript interact?
What is the use of "echo" in php?
What is the purpose of the php empty function?
What are the advantages of triggers?
What is the diffrence between GET,POST and REQUEST Method.