Leetcode 525. Contiguous Array

Input: nums = [0,1]
Output: 2
Explanation: [0, 1] is the longest contiguous subarray with an equal number of 0 and 1.
Input: nums = [0,1,0]
Output: 2
Explanation: [0, 1] (or [1, 0]) is a longest contiguous subarray with equal number of 0 and 1.

--

--

--

CS new grad, 6 years experience related to supply chain management. Located in Bay area

Love podcasts or audiobooks? Learn on the go with our new app.

Programming in Rust: the good, the bad, the ugly.

MapMyRun to Strava Sync

Unit 7.1–7.3 Android Development

How to evaluate your current workplace

How to Create a Dynamic Django Sitemap

Why has NiP lost Bind vs Loud?

Weekly Fone

Introduce and analyze Fixed Forex contract

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gary Chiang

Gary Chiang

CS new grad, 6 years experience related to supply chain management. Located in Bay area

More from Medium

Count Binary Substrings

Backtracking

LeetCode 843. Guess the Word

Palindrome Number🎙