Two Clique Problem Leetcode Javascript