Recursive and iterative methods for generating all possible combinations of numbers (permutation).