Only mark. It’s an example of dynamic programming.
I don’t know how to solve it, what’s more, I can’t understand the answer of others, so I run code of others on leetcode.
Java
by XN W
1 | class Solution { |
Submission Detail
by XN W
- 1808 / 1808 test cases passed.
- Runtime: 7 ms, faster than 100.00% of Java online submissions for Wildcard Matching.
- Memory Usage: 37.7 MB, less than 93.46% of Java online submissions for Wildcard Matching.
ref
I hate this algorithms!! Seriously!!!
- recursive way
- DP way