Citi Interview Question

technical questions can be really tricky