### LeetCode从零单排

4 已关注
31篇博文
• #### 【LeetCode从零单排】No.135Candy(双向动态规划)

1.题目There are N children standing in a line. Each child is assigned a rating value.You are giving ca...

2015-07-29 15:14
1417
• #### 【LeetCode从零单排】No221.Maximal Square

题目Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and r...

2015-07-02 09:58
1315
• #### 【LeetCode从零单排】No22.Generate Parentheses

题目Given n pairs of parentheses, write a function to generate all combinations of well-formed parenth...

2015-07-14 12:01
1048
• #### 【LeetCode从零单排】No133. clon graph (BFS广度优先搜索)

背景（以下背景资料转载自：http://www.cnblogs.com/springfor/p/3874591.html?utm_source=tuicool）DFS（Dpeth-first Sear...

2015-04-06 16:57
1361
• #### 单链表问题（反转、是否有环、删除结尾第N个节点、合并两个sortlist、找到交点）

1.时间复杂度O(N),内存O(1)的效率下实现单链表的翻转public static TreeNode revers(TreeNode head){ TreeNode temp,first,s...

2015-03-26 15:21
1474
• #### 【LeetCode从零单排】No121 Best Time to Buy and Sell Stock

题目Say you have an array for which the ith element is the price of a given stock on day i.If you were...

2015-04-01 09:16
1185
• #### 【LeetCode从零单排】No 191.Number of 1 Bits(考察位运算)

题目Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also kn...

2015-03-13 15:50
4131
• #### 【LeetCode从零单排】No 3 Longest Substring Without Repeating Characters

题目Given a string, find the length of the longest substring without repeating characters. For example...

2015-03-17 16:33
1079
• #### 【LeetCode从零单排】No 114 Flatten Binary Tree to Linked List

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

2015-03-16 14:57
1055
• #### 【LeetCode从零单排】No118 Pascal's Triangle

题目Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Retu...

2015-03-09 15:10
1171
• #### 【LeetCode从零单排】No112 Path Sum

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

2015-03-04 16:48
1288
• #### 【LeetCode从零单排】No104 Maximum Depth of Binary Tree

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

2015-03-04 14:51
1156
• #### 【LeetCode从零单排】No102 Binary Tree Level Order Traversal

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

2015-03-03 16:22
1207
• #### 【LeetCode从零单排】No100 Same Tree && No101 Symmetric Tree

题目1.same treeGiven two binary trees, write a function to check if they are equal or not.Two binary t...

2015-03-02 16:10
1120
• #### 【LeetCode从零单排】No83 Remove Duplicates from Sorted List

题目Given a sorted linked list, delete all duplicates such that each element appear only once.For exam...

2015-03-02 11:18
1062
• #### 【LeetCode从零单排】No88.Merge Sorted Array

题目Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume th...

2015-03-02 09:54
1017
• #### 【LeetCode从零单排】No70.ClimbingStairs

题目          爬楼梯问题，这是一道很有趣的问题。首先看题目：You are climbing a stair case. It takes n steps to reach to the t...

2015-02-20 13:16
1636

题目Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Retur...

2015-02-15 16:44
961
• #### 【LeetCode从零单排】No38.CountAndSay

题目The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 11122...

2015-02-14 18:13
1014
• #### 【LeetCode从零单排】No58.Length of Last Word

题目Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the...

2015-02-15 10:19
1115