摘要: 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].[1,1,2]have the following unique permutations:[1,1,2],[1,2,1], and[2,1,1].如何计算字符串的下一个排列了?先让数组升序,考虑程序运行中的一种情况。来考虑& 阅读全文
posted @ 2014-01-08 17:28 yanghuahui 阅读(545) 评论(0) 推荐(0)