Q. No.1 a) Consider a binary search tree (BST) that isinitially empty. Draw the
ID: 3614996 • Letter: Q
Question
Q. No.1
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.
Explanation / Answer
please rate - thanks I message you the answer to this part insert first number for all subsequent numbers starting at root compare to number if less go to left if more go to right hope this is hint enough
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.