4 ms·
Well, you can extend the parent's solution by throwing in 9 "end of current box" markers with the 100 apples before randomizing the order, rather than declaring
by lmkg 17y ago
Well, you can extend the parent's solution by throwing in 9 "end of current box" markers with the 100 apples before randomizing the order, rather than declaring them to be every 10 apples after sorting. This is probably not an efficient solution from a programming perspective, but it's similar how you would count the number of distinct such arrangements in combinatorics.
- RodgerTheGreat 17y agoAs you said, not very practical from a programming perspective, but it's an interesting way of looking at the problem. Thanks.