WE interview question

Great challenge