Citi Interview Question

My experience, fixed some already implemented code