Leetcode 3641. Longest Semi-Repeating Subarray | Hello Interview