### LeetCode代码思路

1 已关注
89篇博文
• #### LeetCode--Flatten Binary Tree to Linked List

Given a binary tree, flatten it to a linked list in-place.For example, Given 1 / \ ...

2017-12-08 22:21
62
• #### LeetCode--Path Sum II

Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given su...

2017-12-07 14:45
215
• #### LeetCode--Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all...

2017-12-06 13:34
170
• #### LeetCode--Minimum Depth of Binary Tree

Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the short...

2017-12-05 16:49
193
• #### LeetCode--Balanced Binary Tree

Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary t...

2017-12-04 17:10
262
• #### LeetCode-- Convert Sorted List to Binary Search Tree

Given a singly linked list where elements are sorted in ascending order, convert it to a height bala...

2017-12-03 10:51
234
• #### LeetCode--Convert Sorted Array to Binary Search Tree

Given an array where elements are sorted in ascending order, convert it to a height balanced BST.For...

2017-12-02 11:19
347
• #### LeetCode--Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left...

2017-12-01 14:12
78
• #### LeetCode--Construct Binary Tree from Inorder and Postorder Traversal

Given inorder and postorder traversal of a tree, construct the binary tree.Note: You may assume tha...

2017-11-30 15:24
233
• #### LeetCode--Construct Binary Tree from Preorder and Inorder Traversal

Given preorder and inorder traversal of a tree, construct the binary tree.Note: You may assume that...

2017-11-29 20:07
290
• #### LeetCode--Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longe...

2017-11-23 11:04
239
• #### LeetCode--Binary Tree Zigzag Level Order Traversal

Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to...

2017-11-22 11:39
193
• #### LeetCode--Binary Tree Level Order Traversal

Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right,...

2017-11-21 12:12
252
• #### LeetCode--Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For ex...

2017-11-20 15:12
194
• #### LeetCode--Recover Binary Search Tree

Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing ...

2017-11-16 10:28
331
• #### LeetCode--Same Tree

Given two binary trees, write a function to check if they are the same or not.Two binary trees are c...

2017-11-15 10:55
325
• #### LeetCode--Validate Binary Search Tree

Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as ...

2017-11-14 10:43
308
• #### LeetCode--Interleaving String

Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example, Given: s...

2017-11-13 10:40
251
• #### LeetCode--Unique Binary Search Trees

Given n, how many structurally unique BST’s (binary search trees) that store values 1…n?For example,...

2017-11-11 17:17
108
• #### LeetCode--Unique Binary Search Trees II

Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1...

2017-11-12 17:02
319