Problem 669 · Medium

Trim a Binary Search Tree

Cut away every node whose value falls outside a range while keeping the tree ordered. The visual prunes subtrees and reattaches surviving children to their parents.

Open the interactive visualisation