LeetCode #: 1160
Difficulty: Easy
Topics: Array, hash table.
This solution makes use of JavaScript Map objects as hashtable to store the counts of characters.
Assume m is the total number of characters in all the word in words, and n is the total number of characters in chars.
In the worst case, the solution will go through all the m and n characters once.
In the worst case, the size of the hash tables would be m and n.