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
What is composer phar?
How to count a number of words in a string in php?
What are the benefits of using php and mysql?
Is php worth learning in 2019?
What is the php function that removes the first element of the array and returns it?
Does wordpress still use php?
How to find the position of the first occurrence of a substring in a string?
Describe session in php.
What is the sign to start variables in PHP?
suppose if u want to pass session value using cookies onlu.. what changes i've to made in php.ini file?
client side scripting language Vs server side scripting language
How many records can be stored in mysql table?