Test code/internal solution code is incorrect


  • 0
    C

    I think the test code for this problem is incorrect.

    Inputing the two strings:
    "a*b"
    "?ab"

    Should return true based on the rules. The question mark can be come any character (it becomes "a") and the * can become any string, (it becomes "a"), making both strings "aab".

    Ergo the above input should return true, but the "expected answer" is false. Am I missing something?


  • 0
    L

    I don't think the string to be matched has " * ", "?" properties. " * " in your first string is just the symbol star, nothing special


  • 0
    N

    No. The problem is designed so that string s contains no wildcard characters. So your input was wrong.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.