Voleon interview question

Common LC Medium question. Not too difficult.