New York Times Interview Question

Code review round was challenging