a) Consider a binary search tree (BST) that isinitially empty. Draw the tree that will result if
Fantastic news! We've Found the answer you've been seeking!
Question:
a) Consider a binary search tree (BST) that isinitially empty. Draw the tree that will result if the followingnumbers are inserted in the order given: 7, 3, 8, 1, 6, 2, 9,5.
b) What basic operations we can perform on thebinary tree of part (a)
Q.No.2 Answer the Following Questions:
(a)
Suppose we want a function to change the state of an object. Butwe don’t want to send a copy to the function. The objectcould be large and copying it costly in terms of time.
Which of the following is the best solution to do this andwhy?
1) We will use pointers
2) We will use pass by reference
(b) What is dangling reference? Explain withhelp of an example.
Related Book For
Posted Date: