#3721
Longest Balanced Subarray II
master · 1895 · lc hard +32 · 33.7% accepted · 336 likes · top 11%
Description
Given an integer array nums, return the length of the longest subarray where the number of distinct even values equals the number of distinct odd values.
Code
1
2
3