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 list function with their uses.
Does php pass arrays by reference?
What is factory pattern in php?
What is global variable php?
How do you destroy a session?
What is is_null() in php?
How can cross site request forgery csrf be prevented?
How can we know the number of days between two given dates using PHP?
8 Answers AZTEC, HCL, Navsoft,
In how many ways we can retrieve the date in the result set of mysql using PHP?
How long is a php session valid?
Do you know what does $globals means?
Explain me what is the goto statement useful for?