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
Can you specify the "new line" character in single-quoted strings?
What are the array functions in php?
how to get server date and time?
Explain soundex() and metaphone().
write function of the sentence traversal passing the parameter, e.g input:this is input sentence. output:sentence input is this.
Which of the following represents the proper way to set a session variable? Answer: a. $_SESSION['foo'] = 'bar'; b. session_start(); c. session_set_save_handler ('myopen', 'myclose', 'myread', 'mywrite', 'mydelete', 'mygarbage'); d. $foo = $_SESSION['foo']; 2.When administering MySQL, you should make the data directory accessible via the operating system 3.which statement can be used to determine how the optimizer resolves a query
How error handling is being handled by php?
How can you get, the total size of a certain directory?
What is new keyword in php?
Is key in array php?
What is associative array in php?
What are the file upload settings in configuration file?