EY Interview Question

They asked me to code Selection sort