EY interview question

They asked me to code Selection sort