Tap here to switch tabs
Problem
Submissions

Problem: Minimum Absolute Difference in BST

Try to solve the Minimum Absolute Difference in BST problem.

Statement

Given the root of a Binary Search Tree (BST), return the minimum absolute difference between the values of any two distinct nodes in the tree.

Constraints:

  • The number of nodes in the tree is in the range [2,104][2, 10^4].

  • 0≤0 \leq Node.val ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Absolute Difference in BST

Try to solve the Minimum Absolute Difference in BST problem.

Statement

Given the root of a Binary Search Tree (BST), return the minimum absolute difference between the values of any two distinct nodes in the tree.

Constraints:

  • The number of nodes in the tree is in the range [2,104][2, 10^4].

  • 0≤0 \leq Node.val ≤105\leq 10^5