Why isMatch("b","aaa.")->false?


  • 3
    S

    Input: "b", "aaa."
    Output: true
    Expected: false


  • 0
    V

    It is false indeed as both the strings are different right at the first letter symbol . at the end of second string can only match a single character at the end, and match function should cover entire input string.


  • 0
    S

    I still don't understand. '.' Matches any single character, which means it could match 'b', right?


Log in to reply
 

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