Amazon Interview Question

Simplified version of LC 937. Reorder Data in Log Files