上一页 1 ··· 7 8 9 10 11 12 13 14 下一页
摘要: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. 阅读全文
posted @ 2017-05-07 22:14 JeffLai 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 阅读全文
posted @ 2017-05-07 21:19 JeffLai 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "([)]" are not. 阅读全文
posted @ 2017-05-07 21:09 JeffLai 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the nth node from the end of list and return its head. 阅读全文
posted @ 2017-05-07 20:26 JeffLai 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: The solution set must not contain duplicate quadruplets. 阅读全文
posted @ 2017-05-07 20:05 JeffLai 阅读(137) 评论(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 telephone buttons) is given below. 阅读全文
posted @ 2017-05-07 19:29 JeffLai 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution. 阅读全文
posted @ 2017-05-07 16:51 JeffLai 阅读(141) 评论(0) 推荐(1) 编辑
摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. 阅读全文
posted @ 2017-05-07 16:34 JeffLai 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Description Write a function to find the longest common prefix string amongst an array of strings. 思路 最长的公共前缀,所以,先找出前两个的最长前缀,然后再和后面的比,在比的过程中,记录最小的串的长度 阅读全文
posted @ 2017-05-06 13:57 JeffLai 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 阅读全文
posted @ 2017-05-06 13:22 JeffLai 阅读(131) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 下一页