Question: Please make the reorderArray function for the program below. The code must be in Java. Thank you. // For simplicity, we're using strings to represent
Please make the reorderArray function for the program below. The code must be in Java. Thank you.

// For simplicity, we're using strings to represent the data here var data ["E" , "A", "D", "B", "C"); // The order indices indicate the new index of this element after sorting var order =[4, 0, 3, 1, 2); // Your function should reorder the data array and return the result va r result reorderArray (data, order); /I result should now be sorted according to the order indices
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
