Full threaddavid_allison·Was asked this one years back in a university interview. Fantastic problemView on HN