Bank of America Interview Question

Very basic level algorithm questions