← ALL NOTES
Array

3719. Longest Balanced Subarray I

Given an array nums. A subarray is "balanced" if the number of DISTINCT even values in it equals the number of distinct odd values. Find the length of the longest balanced subarray.

Loading…