LeetCode --- 83. Remove Duplicates from Sorted List Mar 3, 2015

 Tags LeetCode , C++ , 链表

题目链接:Remove Duplicates from Sorted ListGiven a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, retur... More »

0条评论

LeetCode --- 82. Remove Duplicates from Sorted List II Mar 3, 2015

 Tags LeetCode , C++ , 链表

题目链接:Remove Duplicates from Sorted List IIGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original lis... More »

0条评论

LeetCode --- 81. Search in Rotated Sorted Array II Mar 1, 2015

 Tags LeetCode , C++ , 数组 , 二分搜索

题目链接:Search in Rotated Sorted Array IIFollow up for “Search in Rotated Sorted Array”:What if duplicates are allowed?Would this affect the run-time complexity? How and ... More »

0条评论

LeetCode --- 80. Remove Duplicates from Sorted Array II Feb 28, 2015

 Tags LeetCode , C++ , 数组 , 回溯

题目链接:Remove Duplicates from Sorted Array IIFollow up for “Remove Duplicates”:What if duplicates are allowed at most twice?For example,Given sorted array A = [1,1,1,2,2... More »

0条评论

LeetCode --- 79. Word Search Feb 28, 2015

 Tags LeetCode , C++ , 数组 , 回溯

题目链接:Word SearchGiven a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where “adjacen... More »

0条评论

LeetCode --- 78. Subsets Feb 20, 2015

 Tags LeetCode , C++ , 数组 , 回溯 , 位操作

题目链接:SubsetsGiven a set of distinct integers, S, return all possible subsets.Note: Elements in a subset must be in non-descending order. The solution set must not co... More »

0条评论

LeetCode --- 77. Combinations Feb 19, 2015

 Tags LeetCode , C++ , 回溯

题目链接:CombinationsGiven two integers n and k, return all possible combinations of k numbers out of 1 … n.For example,If n = 4 and k = 2, a solution is:[ [2,4], [3,4... More »

0条评论

LeetCode --- 76. Minimum Window Substring Feb 19, 2015

 Tags LeetCode , C++ , Hash表 , 双指针 , 字符串

题目链接:Minimum Window SubstringGiven a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S ... More »

0条评论

LeetCode --- 75. Sort Colors Feb 19, 2015

 Tags LeetCode , C++ , 数组 , 双指针 , 排序

题目链接:Sort ColorsGiven an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, w... More »

0条评论

LeetCode --- 74. Search a 2D Matrix Feb 19, 2015

 Tags LeetCode , C++ , 数组 , 二分搜索

题目链接:Search a 2D MatrixWrite an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are s... More »

0条评论