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

File integer_partition.py

dynamic_programming/integer_partition.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1"""
2The number of partitions of a number n into at least k parts equals the number of
3partitions into exactly k parts plus the number of partitions into at least k-1 parts.
4Subtracting 1 from each part of a partition of n into k parts gives a partition of n-k

Callers

nothing calls this directly

Calls 1

partitionFunction · 0.70

Tested by

no test coverage detected