Leetcode 2765. Longest Alternating Subarray | Hello Interview