You want to write a note, but you only have the letters printed in a magazine. You are given two strings: ransomNote is the note you want to write, and magazine has the letters you can cut out.
Each letter in magazine can be cut out and used only once.
Return true if you can write the note with the letters of the magazine. Otherwise return false.
Examples
Example 1:
Input: ransomNote = "tea", magazine = "eat"
Output: true
Explanation: The magazine has one t, one e and one a, which is enough.
Example 2:
Input: ransomNote = "hello", magazine = "helo"
Output: false
Explanation: The note needs two "l", but the magazine has only one.
Example 3:
Input: ransomNote = "aab", magazine = "bbaaac"
Output: true
Explanation: The magazine has enough a and b. The extra letters are not used.