J.P. Morgan Interview Question

qsns from shakuntala devi were asked