I want to keep track of the original position of the values after sorting them.
I saw a solution to this a while back but I lost it somewhere, it was done using a multi-set and pairs.
int x[2][2] = { {3, 2}, {1, 4}};
sorted_x = { {4,(1,1)}, {3,(0,0)}, {2,(0,1)}, {1,(1,0)} };
I have been trying for a few hours now and am unable to find it.