EY Interview Question

Technically challenging question raised by interviewer