Independence Day Sale! Unlock 40% OFF on All Job-Oriented Training Programs – Limited Time Only! Offer Ending in
D
H
M
S
Get Now
Problem Submissions Solution

Largest subarray of 0's and 1's

Difficulty: Easy

Acceptance: %

Points: 20.00

Given an array arr of 0s and 1s. Find and return the length of the longest subarray with equal number of 0s and 1s.


Topics

Companies

Articles

Examples:

NA

Constraints:
  • 1 <= arr.size() <= 105
  • 0 <= arr[i] <= 1
Companies:
Amazon Morgan Stanly Paytm
Topics:
Data Structures Basics
Locked Content
Access Restricted: Please Login to access the code editor and test cases.