Alternative arrangement of numbers in the array
Given an array of 2n numbers of the following format {a1, a2, a3,…an, b1, b2, b3, …bn} We have to write a program to transform this into the following format. {a1, b1, a2, b2, a3, b3, …, an, bn} This can be done using the following algorithm. We iterate over the array for (n-1) times. In…