Easy · Strings
Ransom note
Given ASCII-letter strings note and magazine, return true if note can be spelled from the letters of magazine with each magazine letter used at most once; otherwise return false.
Examples
Example 1
{
"note": "aab",
"magazine": "baa"
}Output: true
Example 2
{
"note": "aa",
"magazine": "ab"
}Output: false
Rebuild it in the studio
Open every published interview problem, solution, scene, and memory room free, with no account.