Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 十元数组的置换_Php_Arrays_Permutation_Factorial - Fatal编程技术网

Php 十元数组的置换

Php 十元数组的置换,php,arrays,permutation,factorial,Php,Arrays,Permutation,Factorial,我想在PHP中对10个元素(值)数组进行排列。我试图修改冒泡排序算法,但我认为这不是一种有效的方法。 所有排列应为10!。提前感谢您的帮助 对于exmaple: {0,1,3...} {0,3,1...} {1,0,3...} {1,3,0...} {3,1,0...} {3,0,1...} 欢迎来到SO!到目前为止你试过什么?为了帮助我们帮助您,请添加一个可能的副本

我想在PHP中对10个元素(值)数组进行排列。我试图修改冒泡排序算法,但我认为这不是一种有效的方法。 所有排列应为10!。提前感谢您的帮助

对于exmaple:

{0,1,3...}
{0,3,1...}
{1,0,3...}
{1,3,0...}
{3,1,0...}
{3,0,1...}

欢迎来到SO!到目前为止你试过什么?为了帮助我们帮助您,请添加一个可能的副本