摘要:
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). For 阅读全文
摘要:
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate each next pointer to point to its ne 阅读全文
摘要:
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 把一个有序的数组转换为一颗平衡二叉搜索树。每次找到中间节点作为根节点,根节点左边部分转换为左子树,右边部 阅读全文
摘要:
Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. 通过树的中序序列和前序序列 阅读全文
摘要:
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only 阅读全文