Leetcode 3407. Substring Matching Pattern | Hello Interview