Algorithm Puzzles: Wildcard Matching
Algorithm Puzzles everyday every week sometimes: Wildcard Matching
Puzzle
Puzzle from leetcode:
Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for ‘?’ and ‘*’ where:
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover the entire input string (not partial).
Solving
Using backtrace:
1 | class Solution: |