I need a piece of code that can give me every possible combination for a situation. Here is the situation
A user has on his screen a text box for every hour of the day (24 text boxes). s/he enters into each box the total number of entities they requre on site in each hour.
00:00 | 01:00 | 02:00 | 03:00 | 04:00 | 05:00 |
1 1 2 2 3 3
I need to place in an array every possible start and finish time to have these entities on site.
Entity One: 00:00 - 05:00
Entity Two: 02:00 - 04:00
Entity Three: 04:00 - 05:00
Above would be one combination
Another may be to have 12 different entities all there for only one hour each.
Thank you in advance,