Pregunta de entrevista de Lowe's Home Improvement

Sorting algorithm, maths puzzle and Data structure