题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »