Hey man can you explaing what this means: if (arr[index] == 0) { return false } Why are we returning false if arr[index] == 0? What does arr[index] == 0 mean?
Hi, So let's traverse the String magazine first, keep counting the character for the string and store the frequency into the new array(counting array). Once we have all frequency for each character, we can traverse the String ransomNote. when there is an index in array is equal to 0, which means it did not occur in String magazine, we need to return false right away. This meant you can't construct the ransomNote by magazine.