OOCL interview question

How would I solve a given problem