摘要: Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left and top 阅读全文
posted @ 2017-12-05 15:34 jasminemzy 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Given a 01 matrix M, find the longest line of consecutive one in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal. Exampl 阅读全文
posted @ 2017-12-05 13:38 jasminemzy 阅读(273) 评论(0) 推荐(0) 编辑
摘要: I: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return II: Given an index k, return the kth row of t 阅读全文
posted @ 2017-12-05 13:04 jasminemzy 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Given a string and a string dictionary, find the longest string in the dictionary that can be formed by deleting some characters of the given string. 阅读全文
posted @ 2017-12-05 11:02 jasminemzy 阅读(285) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes 阅读全文
posted @ 2017-12-05 09:53 jasminemzy 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: 1 阅读全文
posted @ 2017-12-05 06:30 jasminemzy 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho 阅读全文
posted @ 2017-12-05 04:57 jasminemzy 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether this string is valid. We define the vali 阅读全文
posted @ 2017-12-05 03:33 jasminemzy 阅读(224) 评论(0) 推荐(0) 编辑