Demandbase interview question

Sort through this array once using one loop