Find the longest two words those don’t share any characters

Given an array of words (i.e. [“apple”, “paris”, “boar”, “cat”, “tree”, “mango”]), find the max value of length(s) * length(t), where s and t are words from the array. The catch here is that the two words cannot share any characters. Assume that there are many words in the array (N words) and average length of word is M. Answer for the example above is “tree” and “mango” and the result is 4 * 5 = 20.

Hint: Hash each word, compare the hashes and get the max. You can find the solution here