Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.
该标签下的全部文章。
Two elements of a binary search tree (BST) are swapped by mistake.
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can
Get all the paths (always starts from the root) in a binary tree, whose sum would be equal to given value.
Given a directed graph, design an algorithm to find out whether there is a route between two nodes
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursi
给定两个值 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.