Infosys Interview Question

They asked me to write insertion sorting algorithm