Skip to content

Instantly share code, notes, and snippets.

class Solution:
def isMatch(self, s: str, p: str) -> bool:
"""44. Wildcard Matching
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).
@shanecandoit
shanecandoit / reverseParentheses.py
Created July 11, 2024 15:55
1190. Reverse Substrings Between Each Pair of Parentheses
class Solution:
def reverseParentheses(self, s: str) -> str:
""" Reverse Substrings Between Each Pair of Parentheses
You are given a string s that consists of lower case English letters and brackets.
Reverse the strings in each pair of matching parentheses, starting from the innermost one.
Your result should not contain any brackets.
Example 1: