2
* @param {string[]} words5
var maxProduct = function (words) {6
words.sort((a, b) => b.length - a.length);9
for (let word of words) {10
if (m.has(word)) continue;11
const alpha = new Array(26).fill(0);13
let idx = w.charCodeAt(0) - "a".charCodeAt(0);16
m.set(word, parseInt(alpha.join(""), 2));19
const hasCommonLetters = (a, b) => {22
return (sa & sb) != 0;26
for (let i = 0; i < len; i++) {27
for (let j = i + 1; j < len; j++) {28
if (!hasCommonLetters(words[i], words[j])) {29
ans = Math.max(ans, words[i].length * words[j].length);