One problem with the binary tree sort is that the order in which the data is inserted affects the shape of the tree—for the same collection of data, different orderings can yield binary trees of dramatically different shapes. The performance of the binary tree sorting and searching algorithms is sensitive to the shape of the binary tree. What shape would a binary tree have if its data were inserted in increasing order? in decreasing order? What shape should the tree have to achieve maximal searching performance?
What will be an ideal response?
If the data were inserted in increasing or decreasing order, the tree would consist of only right children or only left children, respectively. Essentially, the tree would be a sorted linked list. To achieve maximum performance, the depth of the tree should be minimized—in other words, all non-leaf nodes except for the last row should have two children.
You might also like to view...
Based on existing legislation, who appears to have more influence: businesses or individuals?
What will be an ideal response?
When you are navigating through a system's directories within the Windows 10 CLI, what command will allow you to back up one subdirectory?
A. cd /b B. CD .. C. cd // D. CD .
The built-in IIf Function evaluates a condition and displays:
A) a value only if the condition is true. B) one value when the condition is true and another value when the condition is false. C) a value only if the condition is false. D) the same value for conditions that evaluate to true or false.
____ is actually a set of protocols named packet-based multimedia protocols, and it was designed for a wide range of applications (audio and video).
A. ?H.121 B. ?H.232 C. ?H.256 D. ?H.323