Heap's algorithm (All Permutations All Permutations)

From Algorithm Wiki
Jump to navigation Jump to search

Time Complexity

$O(n)$ per permutation

Space Complexity

$O(n)$ words

($O(n)$-sized stack or array necessary)

Description

Approximate?

Exact

Randomized?

No, deterministic

Model of Computation

Word RAM

Year

1963

Reference

https://academic.oup.com/comjnl/article/6/3/293/360213