摘要: http://oj.leetcode.com/problems/permutations/Given a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1].思路:典型的递归问题。生成[2, 3]的全排列[2, 3]和[3, 2],然后把1加上去生成[1, 2, 3]和[1, 3, 2]。交换1和2的位置,生成[1, 3 阅读全文
posted @ 2013-11-12 14:28 移山测试工作室黑灯老师 阅读(2552) 评论(0) 推荐(0) 编辑
count website visits
Buy Computers