Exam 9: Searching and Sorting
Exam 1: Introduction36 Questions
Exam 2: Analysis of Algorithms31 Questions
Exam 3: Introduction to Collections - Stacks49 Questions
Exam 4: Linked Structures - Stacks51 Questions
Exam 5: Queues28 Questions
Exam 6: Lists42 Questions
Exam 7: Iterators32 Questions
Exam 8: Recursion57 Questions
Exam 9: Searching and Sorting54 Questions
Exam 10: Trees47 Questions
Exam 11: Binary Search Trees50 Questions
Exam 12: Heaps and Priority Queues29 Questions
Exam 13: Sets and Maps47 Questions
Exam 14: Multi-Way Search Trees47 Questions
Exam 15: Graphs29 Questions
Exam 16: UML16 Questions
Exam 17: Object-Oriented Design54 Questions
Select questions type
What attributes should be stored in the TreeNode class?
Free
(Essay)
4.9/5
(46)
Correct Answer:
The TreeNode class must store a pointer to the element stored in that position as well as pointers to each of the children of that node. The class may also contain a pointer to the parent of the node.
-For the binary tree shown, list the elements in the order generated by an PostOrder traversal.

Free
(Short Answer)
4.8/5
(36)
Correct Answer:
PostOrder: A B D F C E
A node that does not have a parent is called the ______ of a tree.
Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
B
A find operation on a balanced binary search tree is O(logn) where as a find operation for binary search tree without the balance assumption is O(n).
(True/False)
4.9/5
(34)
We used a list to implement the iterator methods for a binary tree. What must be true for this strategy to be successful?
(Essay)
4.9/5
(36)
A collection where each node can have from 0 to 2 children is called a ______ Tree.
(Short Answer)
4.8/5
(37)
There are four basic methods for traversing a tree: preorder, inorder, postorder, and level-order.
(Multiple Choice)
4.9/5
(39)
A tree is a nonlinear structure whose elements are organized into a hierarchy.
(True/False)
4.9/5
(37)
-In general, a balanced n-ary tree with m elements will have height ______.

(Short Answer)
4.7/5
(23)
_________ traversal means visit the left child, then the node, then the right child.
(Multiple Choice)
4.9/5
(40)
Postorder traversal means visit the node, then the left child, then the right child.
(True/False)
4.8/5
(40)
Inorder traversal means visit the left child, then the node, then the right child.
(True/False)
4.8/5
(28)
Showing 1 - 20 of 54
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)