When solving this problem, we must first observe how word1 becomes word2. Taking Example1 as an example, the lower left figure lists the distance from “horse” to “ros”.
This problem asks us to calculate the total number of all possible paths from the top-left corner to the bottom-right corner. We can observe that to go from the top-left corner to the bottom-right corner, the robot can only go right or down.