Max Consecutive Ones || Intuition + Examples + Code || Leetcode DAILY CHALLENGE

  Рет қаралды 12,400

Code with Alisha

Code with Alisha

Күн бұрын

Given a binary array nums, return the maximum number of consecutive 1's in the array.
Example 1:
Input: nums = [1,1,0,1,1,1]
Output: 3
Explanation: The first two digits or the last three digits are consecutive 1s. The maximum number of consecutive 1s is 3.
Example 2:
Input: nums = [1,0,1,1,0,1]
Output: 2

Пікірлер: 9
@AishwaryaRamaiahKumar-s6t
@AishwaryaRamaiahKumar-s6t Жыл бұрын
you explained it really well
@debabratadas9762
@debabratadas9762 Жыл бұрын
very nice explanation, we can also do this in python by declaring two variables.
@harshkumaryadav3676
@harshkumaryadav3676 Жыл бұрын
thank you alisha tha way u explained is reallly appreciable ... u got my whole heart for this approach ...keep making content u will grow to the moon ...
@rachanakulkarni6926
@rachanakulkarni6926 Жыл бұрын
Thank you ! Well explained.
@-NGayathri-cc8dq
@-NGayathri-cc8dq 2 жыл бұрын
Thank you😊
@nks5775
@nks5775 7 ай бұрын
Beauty with Brain 🙌 Hope you give a reply Miss.Alisha😅
@taufiqueansari6400
@taufiqueansari6400 2 жыл бұрын
Quite easy way... 🍁
@aleenawilliams7665
@aleenawilliams7665 4 ай бұрын
Thank you
@90kodevamshi79
@90kodevamshi79 7 ай бұрын
ur code is not working for me
Maximum Ones after Modification InterviewBit Code + Examples C++
17:53
Code with Alisha
Рет қаралды 11 М.
Max Consecutive Ones (LeetCode 1004) | Full Solution w/ animations
14:41
OYUNCAK MİKROFON İLE TRAFİK LAMBASINI DEĞİŞTİRDİ 😱
00:17
Melih Taşçı
Рет қаралды 13 МЛН
Watermelon magic box! #shorts by Leisi Crazy
00:20
Leisi Crazy
Рет қаралды 81 МЛН
Every parent is like this ❤️💚💚💜💙
00:10
Like Asiya
Рет қаралды 20 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 74 МЛН
Google Data Center 360° Tour
8:29
Google Cloud Tech
Рет қаралды 5 МЛН
L4. Max Consecutive Ones III | 2 Pointers and Sliding Window Playlist
29:58
Max Consecutive Ones III | LeetCode 1004 | Coders camp
7:40
Coders Camp
Рет қаралды 10 М.
Count Inversions in Array
11:48
Code with Alisha
Рет қаралды 11 М.
Minimum Swaps to sort intuition + code C++ with explanation
15:25
Code with Alisha
Рет қаралды 23 М.
Maximum Consecutive Ones III (If K Flip is Allowed)
9:44
Programming Tutorials
Рет қаралды 20 М.
OYUNCAK MİKROFON İLE TRAFİK LAMBASINI DEĞİŞTİRDİ 😱
00:17
Melih Taşçı
Рет қаралды 13 МЛН