Permutations: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 3,733:
func permutation a, n
for i = 1 to n
temp = a[i]
a[i] = a[n]
a[i] = temp
permutation(a, n - 1)
temp = a[i]
a[i] = a[n]
2,468

edits