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 )
1602Binary tree question - Node has numeric data (int) The function takes depth as argument and sum all the value of the node of the depth. For instance, (0) depth 0 / \ 10 20 depth 1 / \ / \ 40 50 60 70 depth 2 so if you pass get_sum(2), you would return 220 which is 40+50+60+70 (sum of depth2) write the function.
1541Post New Amazon PHP Interview Questions
What is the role of follower in wordpress?
What is purpose of applet programming?
While reading data from hbase, from which three places data will be reconciled before returning the value?
Which function in excel checks whether a condition is true or not?
What is mockito in junit?
Optimized production technology (opt) is a computer-based technique and tool, which helps to schedule production systems. Which are not principles of opt?
What is the difference between Discriminating media and DPDM(Dissolution Profile with Different Media)
What are the data types supported by java? What is autoboxing and unboxing?
what is meant by k-rating in isolation transformer?what is k9, k14 stands for?
How to handle event handlers?
How can you overcome the diamond problem in inheritance?
How do you calculate cooling energy?
How do you tackle a customer ? Explain from your experience and what have learnt from that ?
What is dependency? How it is used into ant?
What is the difference between application level events and component level events in lightning ?