This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
OlderNewer