Minimum Swap Required to Convert Binary Tree to Binary Search Tree
Priya only reaches for Minimum Swap Required to Convert Binary Tree to Binary Search Tree when folder on disk has to stay correct in a file explorer.
Minimum Swap Required to Convert Binary Tree to Binary Search Tree on the board: left < root < right. Then say what folder on disk looks like after.
Without Minimum Swap Required to Convert Binary Tree to Binary Search Tree, a file explorer gets messy and folder on disk is hard to trust.
Priya ships Minimum Swap Required to Convert Binary Tree to Binary Search Tree in a file explorer. That is the use case worth saying.
Don’t do this with Minimum Swap Required to Convert Binary Tree to Binary Search Tree: unbalanced BST becoming a list. Interviewers spot it in ten seconds.
Place Minimum Swap Required to Convert Binary Tree to Binary Search Tree next to nearby DSA work — left < root < right is the link.
One breath for Minimum Swap Required to Convert Binary Tree to Binary Search Tree, then folder on disk, then unbalanced BST becoming a list. Sit down.
8
/ \
3 10
/ \
1 6Board: folder on disk. Dry-run Minimum Swap Required to Convert Binary Tree to Binary Search Tree. Name the trap: unbalanced BST becoming a list.