EY interview question

Technically challenging question raised by interviewer