20%off off — LaunchSpecial
Exercises/#33 Validate Binary Search Tree
#33

Validate Binary Search Tree

Medium🌳 Trees
80 XP

Problem

Given the root of a binary tree, determine if it is a valid binary search tree (BST).

Examples

Input: [2,1,3]
Output: true

Input: [5,1,4,null,null,3,6]
Output: false
treedfsbst
AI Assistant— powered by AI

Unlock hints progressively — start gentle, go deeper only if needed.

💡

Level 1: Gentle Nudge

A subtle direction

🗺️

Level 2: Approach

The algorithm to use

🔍

Level 3: Detailed

Step-by-step guidance

33 / 150

Your Solution

⚡ JavaScript

to save progress and use AI features