Visy Interview Question

How to solve a specific problem