摘要:
算法描述: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2-> 阅读全文
摘要:
算法描述: Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to end 阅读全文
摘要:
算法描述: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given 阅读全文
摘要:
算法描述: Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set t 阅读全文
摘要:
算法描述: Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set t 阅读全文
摘要:
算法描述: Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: The flattened tree should look like: 解题思路:从题目可 阅读全文
摘要:
算法描述: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. Note: A leaf is a node with no children. 阅读全文
摘要:
算法描述: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balance 阅读全文
摘要:
算法描述: Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For ex 阅读全文
摘要:
算法描述: Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For exa 阅读全文