Convert Sorted Array to Binary Search Tree
Given an array of numbers sorted in ascending order, return a height-balanced binary search tree using every number from the array.
Given an array of numbers sorted in ascending order, return a height-balanced binary search tree using every number from the array.
Given a binary search tree, return its mode (you may assume the answer is unique). If the tree is empty, return -1.
Given a binary search tree, rearrange the tree such that it forms a linked list where all its values are in ascending order.
Given the reference to a binary search tree and a value to insert, return a reference to the root of the tree after the value has been inserted in a position that adheres to the invariants of a binary search tree.
Given the reference to a binary search tree, return the kth smallest value in the tree.
Given the reference to a binary search tree, "level-up" the tree. Leveling-up the tree consists of modifying every node in the tree such that every node's value increases by the sum of all the node's values that are larger than it.
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.
Given a binary search tree, return the minimum difference between any two nodes in the tree.
Given a binary search tree, return its mode (you may assume the answer is unique). If the tree is empty, return -1. Note: the mode is the most frequently occurring value in the tree.
Given the reference to the root of a binary search tree and a search value, return the reference to the node that contains the value if it exists and null otherwise.
Given the reference to the root of a binary search tree and a target value, return whether or not two individual values within the tree can sum to the target.
Given a binary tree, containing unique values, determine if it is a valid binary search tree.