You are given a 0-indexed array ’nums’. A pair of integers ‘x’ and ‘y’ is called a strong pair if it satisfies the condition |x - y| <= min(x, y). Your task is to find two integers from ’nums’ that form a strong pair and have the highest possible bitwise XOR value among all strong pairs in the array. You can pick the same integer twice.
You are given an integer array nums and an integer k. The frequency of an element is the number of times it appears in the array. A subarray is called good if the frequency of each element in it is less than or equal to k. Your task is to return the length of the longest good subarray in nums.