Codilar Technologies Interview Question

Pattern based, array swap two adjacent elements.