Bifalgorithm post · Brisk · Chapter 1
How can swapping Zoe and Wash fix the tree?
How can swapping Zoe and Wash fix the tree? (Brisk · Chapter 1) — "Many ways; one would be to swap Zoe ’s and Wash ’s positions. If we do that, the fixed tree…
Ideas in this flowchart
- Obtaining a fixed tree by swapping Zoe’s and Wash’s positions
- This is one of many possible methods.
- Swap Zoe’s and Wash’s positions.
- The swap produces a new fixed tree.
- The fixed tree is listed as Mal, Jayne, Inara, Kaylee, Zoe, River, Simon, and Wash.
- Verify that every node of the new tree satisfies the BST property.
