Search⌘ K
AI Features

DIY: Wildcard Matching

Explore how to implement wildcard pattern matching in Ruby using ? and * operators. Understand matching rules to solve interview problems requiring exact pattern matches on strings.

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:

  • ?
...