### 基础算法

leetcode基础算法题(编程语言C++）

2 已关注
173篇博文
• #### 89. Gray Code

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

2017-10-30 17:06
297
• #### 编程珠玑--啊哈！算法

看起来很困难的问题也可以有一个简单的、意想不到的答案 二分搜索 在程序设计中，二分搜索最常见的应用是在有序数组中搜索元素。顺序搜索在搜索一个具有n个元素表时，平均需要n/2次比较，而二分搜索...

2017-10-11 08:42
62
• #### 79. Word Search

题目Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from ...

2017-10-30 15:12
266
• #### 80. Remove Duplicates from Sorted Array II

题目Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice?For example, Giv...

2017-10-30 15:40
287
• #### 81. Search in Rotated Sorted Array II

题目Follow up for “Search in Rotated Sorted Array”: What if duplicates are allowed?Would this affect ...

2017-10-30 16:08
294
• #### 82. Remove Duplicates from Sorted List II

题目Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct nu...

2017-10-30 16:32
306
• #### 86. Partition List

题目Given a linked list and a value x, partition it such that all nodes less than x come before nodes ...

2017-10-30 16:46
297
• #### 程序员的修炼之道

Don’t repeat yourself 不要重复你自己 Make it easy to reuse 让复用变得容易 Eliminate effects between unrelated thin...

2017-09-28 09:25
57
• #### 编程珠玑-开篇

本书的中心思想：对实例研究的深入思考不仅有趣，而且可以获得实际的益处

2017-09-29 09:13
59
• #### 575. Distribute Candies

题目Given an integer array with even length, where different numbers in this array represent different...

2017-10-06 20:37
46
• #### 61. Rotate List

题目Given a list, rotate the list to the right by k places, where k is non-negative.For example: Give...

2017-09-21 12:10
156
• #### 62. Unique Paths

题目A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).Th...

2017-09-22 08:56
54
• #### 63. Unique Paths II

题目Follow up for “Unique Paths”:Now consider if some obstacles are added to the grids. How many uniqu...

2017-09-22 10:08
66
• #### 64. Minimum Path Sum

题目Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right whi...

2017-09-22 11:17
55
• #### 71. Simplify Path

题目Given an absolute path for a file (Unix-style), simplify it.For example, path = “/home/”, => “/ho...

2017-09-23 11:32
38
• #### 73. Set Matrix Zeroes

题目Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.思路本题因...

2017-09-23 15:45
34
• #### 74. Search a 2D Matrix

题目Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the fol...

2017-09-25 09:28
51
• #### 75. Sort Colors

题目Given an array with n objects colored red, white or blue, sort them so that objects of the same co...

2017-09-25 10:14
39
• #### 77. Combinations

题目Given two integers n and k, return all possible combinations of k numbers out of 1 … n.For example...

2017-09-25 11:51
53
• #### 78. Subsets

题目Given a set of distinct integers, nums, return all possible subsets.Note: The solution set must no...

2017-09-27 08:43
207

3510211