I have an unsorted, two dimensional array that contains a key value pair. I also have a sorted one dimensional array that contains the keys in their order. Like so:
Now, the ordering in the sorted array is probably NOT a natural ordering.
I want to sort the unsorted 2d array based on the sorted 1d
array.
Is there a way built into
java to do this? I'm researching using a Collection with a Comparator. I'm not knowledgable enough to immediately have a solution, perhaps someone else has dealt with this before?