add comments

This commit is contained in:
filifa
2025-09-30 23:58:28 -04:00
parent 5c42040e34
commit a760093f9d
12 changed files with 62 additions and 3 deletions

View File

@@ -29,6 +29,9 @@ func nextPartition(k int, vals []*big.Int) {
}
}
/*
Partitions computes the number of ways to add to n with k or fewer terms.
*/
func Partitions(n, k int) *big.Int {
if n < 0 {
return big.NewInt(0)