Citi interview question

Data structure and Algorithm related.