Sollicitatievraag bij Amazon

Oa question regarding reading 2d array and sorting it.