摘要:
Given a binary tree, find its minimum depth. 阅读全文
摘要:
Given a binary tree, determine if it is height-balanced. 阅读全文
摘要:
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 阅读全文
摘要:
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 阅读全文
摘要:
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). 阅读全文
摘要:
Given preorder and inorder traversal of a tree, construct the binary tree. 阅读全文
摘要:
Given inorder and postorder traversal of a tree, construct the binary tree. 阅读全文
摘要:
Given a binary tree, find its maximum depth. 阅读全文
摘要:
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between). 阅读全文
摘要:
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). 阅读全文
摘要:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). 阅读全文
摘要:
Given two binary trees, write a function to check if they are equal or not. 阅读全文
摘要:
Two elements of a binary search tree (BST) are swapped by mistake. 阅读全文
摘要:
Given a binary tree, determine if it is a valid binary search tree (BST). 阅读全文
摘要:
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. 阅读全文
摘要:
Given a binary tree, return the inorder traversal of its nodes' values. 阅读全文
摘要:
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? 阅读全文