void merge(Card[] cardArray, int first, int mid, int last) Thisis a helper method for the merge sort. It takes as parameters acard array, the first index, the middle index, and the end index.The method merges two adjacent sorted arrays into a single sortedone. The first array begins with the element at first and ends withthe element at mid. The second array begins with the element at mid+ 1 and ends with the element at last. You will have to use thecompares method to make the comparisons.
Solution
// method to merge two adjacent sorted arrays into a singlesorted one.
void merge(Card[]
OR
OR