DIY: Wildcard Matching

Solve the interview question "Wildcard Matching" in this lesson.

Problem statement

You will be given an input string s and a pattern p. You will have to implement wildcard pattern matching with support for ? and * where:

  • ? can match any single character.
  • * can match any sequence of characters. This sequence can be empty.

Please note that the matching must cover the entire input string.

Access this course and 1400+ top-rated courses and projects.