Reddit Interview Question

Coding question involving some sorting. I can't remember the exact question.