DC Energy interview question

Methods to solve a sorting algorithm