摘要:
题目: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function 阅读全文
posted @ 2015-04-18 12:00
YRB
阅读(277)
评论(0)
推荐(0)
摘要:
题目: Given 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 "a 阅读全文
posted @ 2015-04-18 11:59
YRB
阅读(1652)
评论(0)
推荐(1)
摘要:
题目: Given 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], 阅读全文
posted @ 2015-04-18 11:57
YRB
阅读(1096)
评论(0)
推荐(0)
摘要:
题目: Given 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 = "ADOB 阅读全文
posted @ 2015-04-18 11:55
YRB
阅读(368)
评论(0)
推荐(0)
摘要:
题目: Given 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 r 阅读全文
posted @ 2015-04-18 11:54
YRB
阅读(314)
评论(0)
推荐(0)
摘要:
题目: Write 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 sort 阅读全文
posted @ 2015-04-18 11:53
YRB
阅读(221)
评论(0)
推荐(0)
摘要:
题目: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. 链接: http://leetcode.com/problems/set-matrix-zeroes/ 阅读全文
posted @ 2015-04-18 11:52
YRB
阅读(331)
评论(0)
推荐(0)
摘要:
题目: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You h 阅读全文
posted @ 2015-04-18 11:50
YRB
阅读(478)
评论(0)
推荐(0)
摘要:
题目: Given an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c" click to sho 阅读全文
posted @ 2015-04-18 11:49
YRB
阅读(327)
评论(0)
推荐(0)
摘要:
题目: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can yo 阅读全文
posted @ 2015-04-18 00:17
YRB
阅读(302)
评论(0)
推荐(0)

浙公网安备 33010602011771号