Question: H E AP S 1. What is the difference between a binary tree and a tree in which each node has at most two children?
H E AP S
1. What is the difference between a binary tree and a tree in which each node has at most two children?
2. What is the approximate number of comparisons of keys required to find a target in a complete binary tree of size n?
3. What is a heap?
4. What is a priority queue?
5. Demonstrate, step by step, how to construct a max-heap for the list of integers A[1..8] = (12, 8, 15, 5, 6, 14, 1, 10) (in the given order), following Example 4.14.
6. Demonstrate, step by step, how to sort a list of integers (2, 4, 1,
5, 6, 7) using a max-heap, following Example 4.15.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
