Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What happens when a node with a single left child is deleted?
Think about how we connect nodes in a tree.
Can you delete a node with two children the same way you delete a node with one child?
Consider what the structure will look like.
What is the first step when deleting a node with one child?
Focus on the relationship between parent and child.
True or False: Deleting a node with children is the same as deleting a node with one child.
Think about how tree structures work.
Consider a binary search tree with the following values: [50, 30, 70, 20, 40, 60, 80]. If you delete 30, what does the tree look like?
Visualize the tree to confirm the structure.
If a node with value 15 has a single right child 25 and is deleted, what must happen?
Draw the before and after state of the tree.
5 more questions in this section. Enroll free to practise them all.
Enroll free