DEV Community

Alex Rivers
Alex Rivers

Posted on

Problem Statement

Problem Statement

Monday, March 30, 2026 — Medium difficulty — Topic: Backtracking


Problem Statement

You are given a start word, an end word, and a dictionary of valid words. Your task is to find the minimum number of steps required to transform the start word into the end word. In each step, you can perform one of the following operations:

  1. Change one character in the current word to another character (standard move).
  2. Replace one character with a wildcard (*), which can match any character in the next step. The next word must be in the dictionary and match the current pattern with wildcards.

For example, if the current pattern


Find this helpful? Follow for daily coding challenges!

Top comments (0)