Marin Software Interview Question

Similar with word ladder