Amazon Interview Question

First question (online test) - Array iteration/sort