Problem 653 · Easy

Two Sum IV - Input is a BST

Decide whether two different nodes in a search tree sum to a given target. The visual walks the tree in sorted order and uses a set of seen values to look for the complement.

Open the interactive visualisation