2015年7月31日

数组的全排列

摘要: 要求:给出数组A={a_0,a_1,a_2,...,a_n}(n是可变的),打印出所有元素的组合leetcode上面也有这道题https://leetcode.com/problems/permutations/思路:使用回溯BS算法,用一个visited数组保存已经访问过的元素,使用一个list保... 阅读全文

posted @ 2015-07-31 22:16 luckygxf 阅读(1825) 评论(0) 推荐(0) 编辑

导航