Question
HOMEWORK 9 Binary Trees 1. Indicate the contents of a binary tree which possesses the ordering property after the following values are inserted in order:
HOMEWORK 9 Binary Trees 1. Indicate the contents of a binary tree which possesses the ordering property after the following values are inserted in order: Mathematics, Physics, Geography, Zoology, Meteorology, Geology, Psychology, Chemistry. (25 points)
2. Given a binary tree set up such that, at a certain instant, the tree has the following characteristics: a. The value 34.67 is stored in the root node; b. The nodes at a depth of 2, from left to right, have the values 22.33 and 25.67; c. The nodes at a depth of 3, from left to right, have the values 11.23, 23.22, 6.77, and 2.22; d. The nodes at a depth of 4, from left to right, have the values 1.2, 0.45, 1.99, 2.01, 0.33, 0.23, 1.01, and 0.34. Does this binary tree possess the ordering property? Does it possess the heap property? If the values 22.33 and 23.22 were to be switched, would the tree then possess the heap property? EXPLAIN YOUR ANSWERS!!!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started