Pergunta de entrevista da empresa EPAM Systems

Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1.