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
Does php support multiple inheritance?
What is the meaning of curl , which is used while connecting with pay pal? and how it works?
What is the difference between for and foreach?
What is difference between md5 and SHA256?
how can I use bread crumb in PHP ?
What is symfony php?
What are the characteristics of php variables?
How do you check if a variable has been set in php?
How do you create an array in php?
What is a stored procedure in mysql?
Explain Type juggling?
Explain the difference b/w static and dynamic websites?