For the set of numbers {14, 7, 12, 20, 2, 18, 17, 10, 3, 5, 16, 19, 8} 1. Draw a Binary Search Tree diagram for the set of numbers. a) Send me a diagram of what the binary tree looks like. If you don’t have a way of drawing it using your PC, draw it on a piece of paper and take a picture of it. b) Fill in the array structures leftPtr & rightPtr (see below), based on the diagram of your binary tree. leftPtr and rightPtr store the address of the child node to the left and right. In my example, I used 12 as my root. You can use or another number from the set if you want. I did a couple as an example, you do the rest.
For the set of numbers {14, 7, 12, 20, 2, 18, 17, 10, 3, 5, 16, 19, 8}
1. Draw a Binary Search Tree diagram for the set of numbers.
a) Send me a diagram of what the binary tree looks like. If you don’t have a way of
drawing it using your PC, draw it on a piece of paper and take a picture of it.
b) Fill in the array structures leftPtr & rightPtr (see below), based on the diagram of your
binary tree. leftPtr and rightPtr store the address of the child node to the left and right.
In my example, I used 12 as my root. You can use or another number from the set if
you want. I did a couple as an example, you do the rest.
2. Generate pseudocode for a function that will find the minimum value in the tree, in the most
efficient manner (i.e. not linear search)
3. Generate pseudocode for a function that will find the maximum value in the tree, in the most
efficient manner (i.e. not linear search)
Send to me in a MS Word document if possible. There are (4) deliverables (1a, 1b, 2 & 3)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images