View the step-by-step solution to:

# Assume that you have a complete tree with 200 nodes, and that you represent it in array form. Node A of the tree is in position 50 of the array.

Assume that you have a complete tree with 200 nodes, and that you represent it in array form.

1. Node A of the tree is in position 50 of the array. What are the indices of A's left child, right child, and parent? Explain how you got your answers.

2. What is the height of the tree? Explain your answer briefly.

3. The bottom level of the tree contains some number of leaf nodes. Is the rightmost leaf node in the bottom level the left child of its parent or the right child of its parent? Explain your answer briefly.

4. In Problem 6, you will implement a method that determines if the complete tree corresponding to an array of values is a heap. What is the efficiency of determining if an array of length n represents a heap in the best case? In the worst case? Use big-O notation, and explain your answers briefly.

A at index 50, left child of A at index 101, right child is at 102 and... View the full answer

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents