Python  1.0
Functions
_12_perm2 Namespace Reference

Full permutation. More...

Functions

def perm (n, i)
 The full permutation of list "n" can be solved by picking any element, placing it in the first, and recursively solving the smaller problem. More...
 

Detailed Description

Full permutation.

Author
Paulo Roma
Since
18/02/2015
See also
https://helloacm.com/a-recursive-full-permutation-in-python/

Function Documentation

◆ perm()

def _12_perm2.perm (   n,
  i 
)

The full permutation of list "n" can be solved by picking any element, placing it in the first, and recursively solving the smaller problem.

Parameters
nlist to have its elements permuted.
ifirst element index.