문제 링크 : Longest Unequal Adjacent Groups Subsequence I
/** * @param {string[]} words * @param {number[]} groups * @return {string[]} */ var getLongestSubsequence = function(words, groups) { return words.filter((word, i) => i === 0 || groups[i] !== groups[i - 1]); };