### ACM竞赛算法

16 已关注
144篇博文
• #### Leetcode 106 Construct Binary Tree from Inorder and Postorder Traversal

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

2016-10-11 18:56
951
• #### Leetcode 105 Construct Binary Tree from Preorder and Inorder Traversal

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

2016-10-11 18:44
876
• #### Leetcode 104 Maximum Depth of Binary Tree

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

2016-10-09 16:38
910
• #### Leetcode 103 Binary Tree Zigzag Level Order Traversal

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

2016-10-09 16:35
911
• #### Leetcode 102 Binary Tree Level Order Traversal

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

2016-10-09 16:08
945
• #### Leetcode 101 Symmetric Tree

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

2016-10-09 15:52
809
• #### Leetcode 100 Same Tree

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

2016-10-08 21:36
936
• #### Leetcode 99 Recover Binary Search Tree

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

2016-10-08 21:15
876
• #### Leetcode 98 Validate Binary Search Tree

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

2016-10-08 17:04
801
• #### Leetcode 97 Interleaving String

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

2016-10-08 16:40
749
• #### Leetcode 96 Unique Binary Search Trees

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

2016-10-07 18:17
819
• #### Leetcode 95 Unique Binary Search Trees II

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

2016-10-07 17:54
820
• #### Leetcode 94 Binary Tree Inorder Traversal

Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binar...

2016-09-30 12:52
919
• #### Leetcode 93 Restore IP Addresses

Given a string containing only digits, restore it by returning all possible valid IP address combina...

2016-09-30 12:33
985
• #### Leetcode 92 Reverse Linked List II

Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1...

2016-09-28 20:04
983
• #### Leetcode 91 Decode Ways

A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A...

2016-09-28 19:14
947
• #### Leetcode 90 Subsets II

Given a collection of integers that might contain duplicates, nums, return all possible subsets. ...

2016-09-28 18:21
877
• #### leetcode 89 Gray Code

The gray code is a binary numeral system where two successive values differ in only one bit. Given a...

2016-09-28 17:14
887
• #### Leetcode 88 Merge Sorted Array

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note...

2016-09-28 16:28
888
• #### Leetcode 87 Scramble String

Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrin...

2016-09-27 22:48
997