DC Energy Interview Question

Methods to solve a sorting algorithm