Amazon Interview Question: Linear sorting... | Glassdoor