Question 21 1 pts What is the purpose of coloring the nodes red and black in a red-black tree? To automatically rebalance the tree To ensure correct insertion and removal without breaking links To provide easier references to nodes and branches All of these
Question 22 1 pts How does code tell the difference between red and black nodes in a red-black tree? O All nodes in any path from root to leaf have the same number of black nodes. All nodes in any path from root to leaf have the same number of red nodes. A color flag is part of the Node class. O All of these
Question 23 1 pts Which of the following never should occur in a red-black tree? Two red nodes consecutively in any path from root to leaf Two red black nodes consecutively in any path from root to leaf A black root node All of these
Question 24 1 pts What is the minimum number of nodes in a red-black tree with "black height" (bh)? 2bh O 2*bh 26h - 1 (2* bh) - 1
Question 25 1 pts What is the maximum height of a red-black tree with "black height" (bh)? 2bh O 2 *bh O 2bh. 1 O (2*bh) - 1
Question 21 1 pts What is the purpose of coloring the nodes red and black in a red-black tree? To automatically rebalanc
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Question 21 1 pts What is the purpose of coloring the nodes red and black in a red-black tree? To automatically rebalanc
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!