Heap's algorithm (All Permutations All Permutations): Difference between revisions

From Algorithm Wiki
Jump to navigation Jump to search
(Created page with "== Time Complexity == $O(n)$ per permutation == Space Complexity == $O(n)$ auxiliary 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")
 
No edit summary
 
Line 5: Line 5:
== Space Complexity ==  
== Space Complexity ==  


$O(n)$ auxiliary words
$O(n)$ words


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

Latest revision as of 08:41, 10 April 2023

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