Medium · Hashing · about 20 minutes
Asked at Meta, Amazon, Google.
nums holds only 0s and 1s. Find the longest contiguous slice in which the 0s and 1s are equally numerous, and return its length.
nums