NVIDIA interview question

Word Pattern question on Leetcode