Bank of America Interview Question

Not really hard, however, it has to be done within the allowed time.