115. Distinct Subsequences
931. Minimum Falling Path Sum
1305. All Elements in Two Binary Search Trees
1305. All Elements in Two Binary Search Trees
Description
Given two binary search trees root1
and root2
, return a list containing all the integers from both trees sorted in ascending order.
173. Binary Search Tree Iterator
173. Binary Search Tree Iterator
Description
Implement the BSTIterator
class that represents an iterator over the in-order traversal of a binary search tree (BST):
109. Convert Sorted List to Binary Search Tree
109. Convert Sorted List to Binary Search Tree
Description
Given the head
of a singly linked list where elements are sorted in ascending order , convert it to a height-balanced binary search tree.
449. Serialize and Deserialize BST
449. Serialize and Deserialize BST
Description
Serialization is converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be reconstructed later in the same or another computer environment.
108. Convert Sorted Array to Binary Search Tree
108. Convert Sorted Array to Binary Search Tree
Description
Given an integer array nums
where the elements are sorted in ascending order , convert it to a height-balanced binary search tree.
1214. Two Sum BSTs
1008. Construct Binary Search Tree from Preorder Traversal
1008. Construct Binary Search Tree from Preorder Traversal
Description
Given an array of integers preorder, which represents the preorder traversal of a BST (i.e., binary search tree), construct the tree and return its root.