C language recursive full arrangement

xiaoxiao2021-03-06  38

C language - full alignment

/ * Sixth question Write by Arden for TLS, 2005-01-18THIS Program Guide U to Type A N <10 Array, And The Print Out the Permutation * /

#include #define max 10 // Defines the maximum array index void Pmute (int base [], int pstion, int N) // calculates in array base [] all ride {INT i , TEMP; if (pstion == n-1) // Complete the arrangement of the arrangement to be arranged {for (i = 0; i

} else {for (i = pstion; i

The homework of my colleagues, wrote yesterday afternoon. Still have to learn the algorithm .... Say to improve.

The program is not output efficient, and after adding N> 10 after adding, it can't keep up.

转载请注明原文地址:https://www.9cbs.com/read-63398.html

New Post(0)