I hereby claim:
- I am mcall52 on github.
- I am mcall52 (https://keybase.io/mcall52) on keybase.
- I have a public key ASBlabP5K0YgvqHkvuj68rn6KIsicUHS6BofSxTmZoTH1wo
To claim this, I am signing this object:
def allocate_objects(bucket_count: int, object_count: int, allocated_objects: str = "") -> None: | |
"""Prints all possible combinations for allocating objects. | |
This function finds all possible combinations of ways to allocate objects | |
by putting all objects in the first bucket, then iteratively taking away one | |
object from the first bucket and placing it in the next bucket. The solution | |
uses recursion to divide the larger problem (allocate N objects into M buckets) | |
into smaller problems (allocate k objects into M - 1 buckets, then M - 2 buckets ... then into 1 bucket). | |
For example, given `bucket_count = 3` and `object_count = 4`: |
I hereby claim:
To claim this, I am signing this object: