J.P. Morgan interview question

He asked me to explain the coding round question.