Company: BNY_18nov
Difficulty: medium
Unequal Elements Problem Description You are preparing a test on a programming platform with questions from different skill sets. Given an array of skills, where skills[i] represents the skill type of the i-th question, you need to select questions for the test. The questions should be grouped by skill type as much as possible. Your goal is to find the maximum length of a subsequence of skills such that there are no more than k unequal adjacent elements in the subsequence. Formally, find a subsequence of skills, call it x, of length m such that there are at most k indices i (where 0 <= i < m-1) for all x[i] != x[i+1]. Note: A subsequence is obtained by deleting some elements (possibly none) without changing the order of the remaining elements. The function to complete is findMaxLength. It takes the following parameters: skills: an array of different skill types int k: the maximum count of unequal adjacent elements. Returns: int: the maximum value of m (the length of the longest valid s