Finoit Interview Question

3)water jug problem,8 ball problem