← ALL NOTES
String

44. Wildcard Matching

This looks like a DP problem, and it has a clean O(m·n) table — but wildcard is loose enough that a greedy two-pointer beats it on space. Walk both strings: on a ? or an exact match, advance both. On…

Loading…