Copyright | (c) Eric Mertens 2021 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
combinations :: Int -> [Int] -> Int -> [Int] -> [Int] Source #
Given a list of container sizes and an amount, return a list of the ways to chose a subset of those containers so that they sum to the desired amount. The resulting list is arranged by number of containers used. The nth element uses n-containers (zero-indexed).