上一页 1 2 3 4 5 6 7 8 ··· 30 下一页
摘要: Paint HouseThere are a row ofnhouses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with... 阅读全文
posted @ 2015-09-06 10:56 Eason Liu 阅读(2151) 评论(0) 推荐(0) 编辑
摘要: Shortest Word DistanceGiven a list of words and two wordsword1andword2, return the shortest distance between these two words in the list.For example,A... 阅读全文
posted @ 2015-09-06 10:51 Eason Liu 阅读(2105) 评论(0) 推荐(0) 编辑
摘要: Integer to English WordsConvert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231- 1.For examp... 阅读全文
posted @ 2015-08-31 12:18 Eason Liu 阅读(878) 评论(0) 推荐(0) 编辑
摘要: 最长合成字符串题目描述有一组单词,请编写一个程序,在数组中找出由数组中字符串组成的最长的串A,即A是由其它单词组成的(可重复)最长的单词。给定一个string数组str,同时给定数组的大小n。请返回最长单词的长度,保证题意所述的最长单词存在。测试样例:["a","b","c","ab","bc","... 阅读全文
posted @ 2015-08-19 23:49 Eason Liu 阅读(515) 评论(0) 推荐(0) 编辑
摘要: Trapping Rain Water IIGivennxmnon-negative integers representing an elevation map 2d where the area of each cell is1x1, compute how much water it is a... 阅读全文
posted @ 2015-08-19 22:15 Eason Liu 阅读(2274) 评论(0) 推荐(0) 编辑
摘要: Coins in a Line IIIThere arencoins in a line. Two players take turns to take a coin from one of the ends of the line until there are no more coins lef... 阅读全文
posted @ 2015-08-18 23:47 Eason Liu 阅读(2275) 评论(0) 推荐(0) 编辑
摘要: 子串判断题目描述现有一个小写英文字母组成的字符串s和一个包含较短小写英文字符串的数组p,请设计一个高效算法,对于p中的每一个较短字符串,判断其是否为s的子串。给定一个string数组p和它的大小n,同时给定strings,为母串,请返回一个bool数组,每个元素代表p中的对应字符串是否为s的子串。保... 阅读全文
posted @ 2015-07-30 21:39 Eason Liu 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 最大子方阵题目描述有一个方阵,其中每个单元(像素)非黑即白(非0即1),请设计一个高效算法,找到四条边颜色相同的最大子方阵。给定一个01方阵mat,同时给定方阵的边长n,请返回最大子方阵的边长。保证方阵变长小于等于100。测试样例:[[1,1,1],[1,0,1],[1,1,1]],3返回:3要看清... 阅读全文
posted @ 2015-07-30 21:27 Eason Liu 阅读(737) 评论(0) 推荐(0) 编辑
摘要: Number of Islands IIGiven a n,m which means the row and column of the 2D matrix and an array of pair A( size k). Originally, the 2D matrix is all 0 wh... 阅读全文
posted @ 2015-07-28 19:24 Eason Liu 阅读(3154) 评论(0) 推荐(0) 编辑
摘要: Different Ways to Add ParenthesesGiven a string of numbers and operators, return all possible results from computing all the different possible ways t... 阅读全文
posted @ 2015-07-27 22:50 Eason Liu 阅读(3946) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 30 下一页