525. Contiguous Array
Array, Hash Table, Prefix Sum, AMateList ·Problem Statement
link: LeetCode.cn LeetCode Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1.
Example:
Input: nums = [0,1]
Output: 2
Input: nums = [0,1,0]
Output: 2
Solution Approach
Algorithm
Implement
Class Solution:
def findMaxLength(self, nums: List[int]) -> int: