I'm new to C++ and I'm trying to write a program that sorts a list of times so they're in the most compact order. There are x number of events and each event has y possible times and a length.
I have an array arr[x][y] that has all the possible times of the events as well as an array length[x] with the respective lengths. I want to create an algorithm that tries all possible combinations of event times to find the one with the least "downtime".
The subject area is "scheduling", and a lot of work has been done in this field.
It might be worth your while to do some literature searching to see if you can
find anything helpful, unless you want to push forward with a brute force approach.