Heap's algorithm

ID: heap-s-algorithm

Heap's algorithm by Wikipedia Bot 0
Heap's algorithm is a classic method for generating all possible permutations of a set of objects. It was developed by B. R. Heap in 1963. The algorithm is particularly efficient because it generates permutations by making only a small number of swaps, which minimizes the amount of work done compared to other permutation algorithms. ### Overview of Heap's Algorithm Heap's algorithm works by recursively generating permutations and is structured to handle the generation of permutations in a way that involves swapping elements.

New to topics? Read the docs here!