Question
Assume thta empName and empID are two parallel arrays of sizenumEmp that hold employee data. Write a pseudocode algorithm thatsorts the empID array in ascending ID number order (using any sortyou wish), such that the two arrays remain parallel. That is, aftersorting, for all indexes in the arrays, emName[index] must still bethe name of the employee whose ID is in empID[index] i really have no idea where to even start on thisone.... Assume thta empName and empID are two parallel arrays of sizenumEmp that hold employee data. Write a pseudocode algorithm thatsorts the empID array in ascending ID number order (using any sortyou wish), such that the two arrays remain parallel. That is, aftersorting, for all indexes in the arrays, emName[index] must still bethe name of the employee whose ID is in empID[index] i really have no idea where to even start on thisone....
Explanation / Answer
Modify the algorithm for insertion sort on array empID[] such thatit also sorts the names in the array empName[] Algorithm: (using insertion sort) 1) empID[] //contains employee ID 2) empName[] //contains employee names 3) length = empID.length() ///empID[] and empName[] will have equallength 4) for(int i=1; i