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 )
1575Binary 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.
1508Can we remove an element in a single linked list without traversing? Lets suppose the link list is like this 1 2 3 4 5 6 We need to remove 4 from this list (without traversing from beginning) and the final link list shud be 1 2 3 5 6 only thing we know is the pointer to element "4". How can we remove "4" and link "3" to "5"?
CSC,
6 6995There is a number and when the last digit is moved to its first position the resultant number will be 50% higher than the original number.Find the number?
1 2609What is optimization in c++? when using volatile.optimization is not possible..what does this mean?
1 3300
What is the difference between echo print print_r and var_dump?
In an customer exit (include Z) program, only the last record is getting fetched. The exit is getting called after pressing save button. What to write for fetching the first record ? Before saved to a SAP table how can i call all these records in an itab in the exit ?
What is Primary Constructor? What is Secondary or Auxiliary Constructor in Scala?
How to Log in to the remote datamodule?
How long does a php session last for?
How to Get the longfilename from a file?
Does the 644 permissions on wp-config.php compromise the username and password to all other users on my shared server?
The statement, int(*x[]) () what does in indicate?
How to generate a request in laravel?
How do I prevent my images from being hot-linked by another website?
Explain the Role of Publisher in Joomla?
What are the different import functions in r?
What is the use of com component in .net?
How do I edit my homepage on wordpress?
What is function pointer c?