can anyone help me to find a tree search for this problem? actually, I can\'t understand the solution.