Raisin Interview Question

Explain the home task solution.