Citi interview question

How to solve difficult problem