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

  • 3

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

  • 0

    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

    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.