Gen interview question

How would I solve practical problem.