上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 50 下一页
摘要: Implement wildcard pattern matching with support for '?' and '*'. 通配符匹配问题,和10. Regular Expression Matching 类似。'?'匹配1个字符,'*'匹配任何字符序列,包括空的。有贪心Greedy, 动态 阅读全文
posted @ 2018-03-04 05:57 轻风舞动 阅读(594) 评论(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: " 阅读全文
posted @ 2018-03-03 16:24 轻风舞动 阅读(571) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. Example 1: Exampl 阅读全文
posted @ 2018-03-03 16:07 轻风舞动 阅读(458) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: No 阅读全文
posted @ 2018-03-03 15:54 轻风舞动 阅读(699) 评论(0) 推荐(0) 编辑
摘要: Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero. To make pro 阅读全文
posted @ 2018-03-03 15:22 轻风舞动 阅读(564) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique q 阅读全文
posted @ 2018-03-03 14:04 轻风舞动 阅读(455) 评论(0) 推荐(0) 编辑
摘要: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv 阅读全文
posted @ 2018-03-03 09:36 轻风舞动 阅读(813) 评论(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 @ 2018-03-03 08:24 轻风舞动 阅读(484) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo 阅读全文
posted @ 2018-03-03 07:32 轻风舞动 阅读(780) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文
posted @ 2018-03-03 07:20 轻风舞动 阅读(765) 评论(0) 推荐(0) 编辑
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 50 下一页