Citi interview question

technical questions can be really tricky