Move through the elements of list X one at a time. For each X[i], scan through list Y to find the location j where it would be placed if it were inserted in sorted order into list Y. Then copy X[i] to Z[i+j]. Do the same thing for list Y, finding the location j in list X where Y[i] would be placed. Then copy Y[i] to Z[i+j]. The above sequential algorithm is easily parallelized using OpenMP parallel format.

Solved
Show answers

Ask an AI advisor a question