314e interview question

They asked to write a code , like in a typical SE interview