摘要: Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1, 阅读全文
posted @ 2019-09-22 22:30 xuan_abc 阅读(128) 评论(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: S 阅读全文
posted @ 2019-09-22 11:31 xuan_abc 阅读(145) 评论(0) 推荐(0)
摘要: Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. Exampl 阅读全文
posted @ 2019-09-22 10:13 xuan_abc 阅读(165) 评论(0) 推荐(0)
摘要: Given an array of integers, sort the elements in the array in ascending order. The quick sort algorithm should be used to solve this problem. Examples 阅读全文
posted @ 2019-09-22 07:00 xuan_abc 阅读(122) 评论(0) 推荐(0)
摘要: Given an array of integers, sort the elements in the array in ascending order. The selection sort algorithm should be used to solve this problem. Exam 阅读全文
posted @ 2019-09-22 05:27 xuan_abc 阅读(133) 评论(0) 推荐(0)
摘要: Given an array of integers, sort the elements in the array in ascending order. The merge sort algorithm should be used to solve this problem. Examples 阅读全文
posted @ 2019-09-22 05:08 xuan_abc 阅读(93) 评论(0) 推荐(0)