Community Problem

Recover Binary Search Tree

Difficulty: Medium

Two BST nodes have been swapped by mistake. Restore the BST in-place by finding and swapping them back.

Recover Binary Search Tree

Two BST nodes have been swapped by mistake. Restore the BST in-place by finding and swapping them back.

MEDIUM
$6.99
trees
bst
dfs
recursion
ananyanakamura

By @ananyanakamura

March 22, 2026

·

Updated May 18, 2026

921 views

5

4.3 (15)

Problem statement is locked. Purchase this item to view the full content.

Solution

Starter code, test cases, and solutions are locked.

Purchase this item to access the full workspace.

All Problems