Citi Interview Question

Unfortunately I was rejected in 1st round