摘要:
描述 Given a collection of distinct integers, return all possible permutations. Example: 思路一:递归 利用STL的函数swap()来交换数组的元素 思路二 next_permutation方法 利用STL的库函数: 阅读全文
摘要:
描述 Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where t 阅读全文
摘要:
描述: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime 阅读全文
摘要:
描述 Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: 思路 借鉴Merge Two Sorted Lists的解决思路,对两个数组先 阅读全文
摘要:
描述 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 阅读全文
摘要:
题目描述: Given a linked list, remove the n-th node from the end of list and return its head. Example: Note: Given n will always be valid. Follow up: Coul 阅读全文