Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
(合并k个有序链表)
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
(合并k个有序链表)
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
(n 对括号所有组合形式)
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.
(合并有序链表)
Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, determine if the input string is valid.
(判断有效的括号对)
Given a linked list, remove the n-th node from the end of list and return its head.
(删除链表尾开始的第 N 个)
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 problem a bit easier, all A, B, C, D have same length of N where 0 ≤ N ≤ 500. All integers are in the range of -2^28 to 2^28 - 1 and the result is guaranteed to be at most 2^31 - 1.
(寻找4个数组中四个数的和为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 quadruplets in the array which gives the sum of target.
(寻找数组中四个数的和为target的组合)
Given a string containing digits from 2-9 inclusive, 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. Note that 1 does not map to any letters.
(根据九宫格键盘将数字映射到字符)
Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactly one solution.
(寻找数组中三个数的和最接近target的一个组合)
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
(寻找数组中三个数的和为0的所有组合)