#3719

Longest Balanced Subarray I

specialist · 630 · lc medium +30 · 65.7% accepted · 479 likes · top 71%

Description

Given an integer array nums, return the length of the longest subarray in which the count of distinct even numbers equals the count of distinct odd numbers.

Code

1
2
3