摘要:
22. Generate Parentheses Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n 阅读全文
摘要:
21. Merge Two Sorted Lists Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of th 阅读全文
摘要:
20. Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brack 阅读全文
摘要:
19. Remove Nth Node From End of List Given a linked list, remove the nth node from the end of list and return its head. For example, Note:Given n will 阅读全文
摘要:
16. 3Sum Closest 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 th 阅读全文
摘要:
15. 3Sum 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 th 阅读全文
摘要:
11. Container With Most Water Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are 阅读全文