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
What is member variable?
What is php dependency injection?
What is the difference between get and post method in php?
What is the apache?
Whether php supports microsoft sql server?
how to select the multiple data in selection button
Which software is best for php?
Explain me what is the goto statement useful for?
Write a program using while loop in php?
Is php harder than javascript?
Explain type casting and type juggling.
How to create a directory?