Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine, and false otherwise.
Each letter in magazine can only be used once in ransomNote.
ransomNote = "a", magazine = "b"falseransomNote = "aa", magazine = "ab"falseransomNote = "aa", magazine = "aab"true1 <= ransomNote.length, magazine.length <= 10^5ransomNote and magazine consist of lowercase English lettersRun your code to see results
Use Cmd+Enter to run