Search Range
给定两个值 k1 和 k2(k1 < k2)和一个二叉查找树的根节点。找到树中所有值在 k1 到 k2 范围内的节点。即打印所有x (k1 <= x <= k2) 其中 x 是二叉查找树的中的节点值。
该标签下的全部文章。
给定两个值 k1 和 k2(k1 < k2)和一个二叉查找树的根节点。找到树中所有值在 k1 到 k2 范围内的节点。即打印所有x (k1 <= x <= k2) 其中 x 是二叉查找树的中的节点值。
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
Check if a binary tree is a Binary Search Tree (BST), you may assume there is no element having same value.
Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequen