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
Which methods should be used for sending an email using the variables $to, $subject, and $body?
What are the delimiters in php?
What are the features of php?
What is if isset ($_ post submit )) in php?
What are major variables in research?
What is the content of /etc directory?
What are the three classes of errors that can occur in php?
How to enable cURL in PHP?
How is it possible to return a value from a function?
Is php the same as html?
Why php is used?
How is it possible to cast types in php?