This is an oddly specific case, but I have 3 arrays, all with flexible sizes(but same) and valuables and I need to order one of them using the other 2. For instance
int[] array1 = new int[0 ,1 ,1 ,1 ,0];
int[] array2 = new int[5 ,3 ,4 ,2 ,0];
int[] array3 = new int[0 ,1 ,2 ,3 ,4];
// Results array3 == [2,1,3,0,4]
I want to order the third array first by the values of the first one and using the second one in cases the first array couldn't order. Is there a way to do it cleanly or do I have to hardcode it?