Overflowing Buckets

Hello everyone ๐Ÿ‘‹, Today I want to share with you a problem Iโ€™ve encountered along my journey. The problem is fairly simple: You have a finite number of water units. You have a finite number of buckets. You need to distribute the water units into the buckets. Each bucket has a maximum capacity. When a bucket is full, the water overflows into the next two buckets by splitting evenly. You need to print the number of the buckets that are full....

June 15, 2023 ยท 3 min ยท Denis Nutiu