CS 400 Exam 1 Questions & Answers 2023/2024
CS 400 Exam 1 Questions & Answers 2023/2024 Red-Black Tree - ANSWER-Binary Search Tree that stays "balanced" (not height balanced) RBT root property - ANSWER-must be black RBT red property - ANSWER-Red nodes must have black children or no children RBT black property - ANSWER-every path from root to null child must have same number of black nodes(include root) RBT lookup - ANSWER-same as BST RBT insert - ANSWER-Same as BST but rebalancing RBT delete - ANSWER-Same as BST but detect and fix RBT red node inserted, which property violated A. root property B. black property C. red property - ANSWER-Red property if parent is red Tri-node restructuring (RBT) - ANSWER-parent sibling is null Recoloring (RBT) - ANSWER-parent sibling is red Time complexity of print (BST) - ANSWER-o(n)
Document information
- Uploaded on
- June 24, 2023
- Number of pages
- 8
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers