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 type of errors can be occurred in php?
How do you check if a variable has not been set in php?
why header() gives the error like header already sent in php please explain in brief
Describe which programming language does php parallel to?
How does php server work?
Is php a dying language?
Do while loops php?
What is array filter in php?
What is the use of Php variables?
What is a php namespace?
Is multilevel inheritance possible in php?
What is an operator in php?