Computer Science, asked by Jrajesh6444, 1 year ago

Given two arrays a1[] and a2[] of size n and m respectively. The task is to sort a1 in such a way that the relative order among the elements will be same as those in a2. For the elements not present in a2, append them at last in sorted order. It is also given that the number of elements in a2[] are smaller than or equal to number of elements in a1[] and a2[] has all distinct elements.

Answers

Answered by danielshivasai
0
  • Given two arrays A1[] and A2[], sort A1 in such a way that the relative order ... For the elements not present in A2, append them at last in sorted order.

  • pls click brainlylist
Similar questions