Amazon interview question

Reorder Data in Log Files