I have two lists of items, each item containing a timestamp. I need to build pairs of items consisting of an item each from collection a and collection b so that in the end the overall time difference of the picked pairs is minimal.
These lists are rather short (maybe up to ten items) and do not necessarily contain the same amount of items.
I started by building all possible combinations and evaluating the result, but this results in very large list of combinations quite quickly (518,400 for 6 items each).
I think there must be some smarter way using the timestamps, but I cannot figure out how one would approach this.
Anyone have an idea? C# preferably, but pseudo code would be fine as well.