Oct-05-2020, 06:14 PM
(This post was last modified: Oct-06-2020, 02:28 AM by deanhystad.)
This is the sticks problem that is discussed in another thread. From the provided example the initial list contains the values [3,2,4,4,5,7] and the four tourists are the sticks. You need to keep the subsets, or their length, and do a little math to get the room numbers, but the same code can be used to solve both problems.