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
Explain about image types in detail?
i'm b.com graduate and doing MCM- 1year(Master in Computer Management. i'm very interested in PHP? Please tell me some suggetion and the scope of PHP in the market. My E-mail pawan.register@gmail.com Thanks & Regards Pawan.
What are the common uses of php?
Why php is widely used?
can any one tell how to install LAMP server in terminal in ubuntu.....and also tell please how to run php files in ubunut and how to save and compile in ubuntu..i already installed ubuntu ..but i dont installed lamp server so i want to install lamp server in terminal is it possible please reply
What is the function of mysql_real_escape_string in php?
What are the basic steps to store PHP session in to Database?
How to repeat a string to a specific number of times in php?
Describe the differences between the object models in PHP 4 and PHP 5.
What are the differences between PHP3 and PHP4 and PHP5? what is the current stable version of PHP?
When to use self over $this?
Does not want to see PHPSESSID in the url. How can be done this ?