MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / heaps_algorithm_iterative.py

File heaps_algorithm_iterative.py

divide_and_conquer/heaps_algorithm_iterative.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1"""
2Heap's (iterative) algorithm returns the list of all permutations possible from a list.
3It minimizes movement by generating each permutation from the previous one
4by swapping only two elements.

Callers

nothing calls this directly

Calls 2

splitMethod · 0.80
heapsFunction · 0.70

Tested by

no test coverage detected