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

Post New Answer

More PHP Interview Questions

/temp is a type of filesystem directory. State Whether True or False?

0 Answers  


Difference between mysql_connect and mysql_pconnect?

0 Answers  


what is the post and get method??

14 Answers   Google,


How will you create a bi-lingual site (multiple languages) ?

3 Answers  


How can we submit from without a submit button?

0 Answers  






Hello I m 1.5 exp, i want code : ms word to Html in php,retrieve the words in ms word in to dispaly browser in (same format,alignment). pls help me everybody Regards selva

0 Answers  


What are the difference between array_keys() and array_key_exists() in php?

0 Answers  


Can you use php and javascript together?

0 Answers  


Which function(s) in PHP computes the difference of arrays?

0 Answers  


How can post form values with out press submit button

5 Answers  


How can we know the number of days between two given dates using PHP?

8 Answers   AZTEC, HCL, Navsoft,


What is php explain how php works?

0 Answers  


Categories