I have asked to estimate the amounts of skittles in a litre cube box.
I have asked to estimate the amounts of skittles in a litre cube box.
Even the easiest five-minute coding problem is better than nothing.
We end up applying multiple filters throughout the process, but try similarly to keep them as simple as possible not to too strongly bias for one thing.
I've not had skittles in years, are they as big as smarties? I think a little smaller? Sure, you can start your estimation by laying them down in a 10x10 grid, and stacked 20 high, but that's very far off. Maybe 13x13x20? So that would be the most loosely packed version, if we shift them off so that layer+1 is in the depressions of layer+0, maybe we can stack 30 high. So yeah, that's my best mathematical approach and I guess it's at least 50% off.
Did I pass?