我想要一个java中数字的排列程序 [英] i want a permutation program for numbers in java
本文介绍了我想要一个java中数字的排列程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
说我的输入是3,然后输出我想要的是......
123,
132,
213,>
231,
312,
321,
如果是4,那么
1234,
1243,
1324,
1342,
....,
....,
....
say my input is 3, then output i want is...
123,
132,
213,
231,
312,
321,
if 4, then
1234,
1243,
1324,
1342,
....,
....,
....
推荐答案
CP QA最重要的规则之一是:谷歌! [ ^ ]
很少有第一个链接:
http://stackoverflow.com/questions/20906214/permutation- algorithm-for-array-of-integers-in-java [ ^ ]
http://stackoverflow.com/questions/10503392/java-code-for-permutations-of-a -list-of-numbers [ ^ ]
One of the most important rules of CP QA is: Google it![^]
Few first links:
http://stackoverflow.com/questions/20906214/permutation-algorithm-for-array-of-integers-in-java[^]
http://stackoverflow.com/questions/10503392/java-code-for-permutations-of-a-list-of-numbers[^]
这篇关于我想要一个java中数字的排列程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文