"You may assume that all inputs are consist of lowercase letters a-z. " is not true!


  • 0
    S

    There is an uppercase "T" from the input data.
    My line 55 code access a 26 long array, corresponding to the 26 lowercase letters a-z.
    children[c - 'a'] != null
    And I have the error message below:

    Runtime Error Message:
    Line 55: java.lang.NullPointerException
    Last executed input:
    ["Trie","search"]
    [[],["a"]]

    If all in puts consist of lowercase letters, how it comes with input data with uppercase letter?
    What's it for?


Log in to reply
 

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