Hexaware Technologies Interview Question

Thet asked to sort a given array and explain them the the sorted array after execution of every loop