#

Title

Solution

Time

Space

Difficulty

Note

938

Range Sum of BST

Python

O(n)

O(h)

Easy

BST, DFS, BFS

108

Convert Sorted Array to Binary Search Tree

Python

O(n)

O(log(n))

Easy

Recursion

110

Balanced Binary Tree

Python

O(n)

O(h)

Easy

Recursion

220

Contains Duplicate III

Python

O(n log(k))

O(k)

Hard

Binary Search Tree

235

Lowest Common Ancestor of a Binary Search Tree

Python

O(h)

O(1)

Medium

Binary Search Tree

703

Kth Largest Element in a Stream

Python

O(n log(k))

O(k)

Easy

Binary Heap

450

Delete Node in a BST

Python

O(h)

O(1)

Medium

Binary Search Tree

701

Insert into a Binary Search Tree

Python

O(h)

O(1)

Medium

Tree, BST

700

Search in a Binary Search Tree

Python

O(h)

O(1)

Easy

Tree, BST

173

Binary Search Tree Iterator

Python

O(1), amortized

O(h)

Medium

Design

285

Inorder Successor in BST

Python

O(h)

O(1)

Medium

Premium, Binary Search Tree

98

Validate Binary Search Tree

Python

O(n)

O(h)

Medium

Recursion

#285) Given the root of a binary search tree and a node p in it, return the in-order successor of that node in the BST. If the given node has no in-order successor in the tree, return null.

The successor of a node p is the node with the smallest key greater than p.val.