Write a function that takes "depth" as argument and return
sum of node's data of that depth.
For instance,
(0) depth 0
/ \
(10) (20) depth 1
/ \
(40) (50) depth2
If I pass get_sum_by_depth(2) ,
it would return 90 (i.e. 40 + 50 )
No Answer is Posted For this Question
Be the First to Post Answer
Does not want to see PHPSESSID in the url. How can be done this ?
What is the function file_get_contents() usefull for?
Write a program using while loop?
What is the use of final class in php?
Why many companies are switching their current business language to php?
How to generate pdf file in php?
What is php.ini & .htacess file?
What are the different components used in php for formatting?
How many ways to include array elements in double-quoted strings using php?
What is session management php?
What is a php class?
Tell me how can we connect to a mysql database from a php script?