上一页 1 2 3 4 5 6 7 8 ··· 14 下一页
摘要: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. 阅读全文
posted @ 2017-06-01 20:33 JeffLai 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 随手搜的一个问题,本来只是想印证一下自己的想法,怎料这个问题居然还有这么多不同的说法。 阅读全文
posted @ 2017-06-01 10:07 JeffLai 阅读(567) 评论(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). 阅读全文
posted @ 2017-06-01 09:10 JeffLai 阅读(152) 评论(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 red, white and blue. 阅读全文
posted @ 2017-05-31 20:42 JeffLai 阅读(111) 评论(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 sorted from left to right. * The first integer of each row is greater than the last integer of the previous row. 阅读全文
posted @ 2017-05-31 20:19 JeffLai 阅读(106) 评论(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. 阅读全文
posted @ 2017-05-31 19:33 JeffLai 阅读(114) 评论(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.) 阅读全文
posted @ 2017-05-30 19:00 JeffLai 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Given an absolute path for a file (Unix-style), simplify it. 阅读全文
posted @ 2017-05-30 17:13 JeffLai 阅读(110) 评论(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 you climb to the top? Note: Given n will be a positive integer. 阅读全文
posted @ 2017-05-30 16:05 JeffLai 阅读(74) 评论(0) 推荐(0) 编辑
摘要: Implement int sqrt(int x). Compute and return the square root of x. 阅读全文
posted @ 2017-05-30 15:56 JeffLai 阅读(116) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 14 下一页