8. Contiguous Array
Given a binary array nums
, return the maximum length of a contiguous subarray with an equal number of 0
and 1
.
Example 1:
Example 2:
Solution: (Hashing)
Time Complexity: O(n)
Last updated
Given a binary array nums
, return the maximum length of a contiguous subarray with an equal number of 0
and 1
.
Example 1:
Example 2:
Time Complexity: O(n)
Last updated