Ransom Note
Easy
Strings
Hash Table
String
Return true if ransom note can be constructed from magazine letters (each letter used once).
Constraints
1 ≤ lengths ≤ 10^5
Examples
Example 1:
Input: a
b
Output: false
Example 2:
Input: aa
aab
Output: true
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console