#shorts Day 9 Find the maximum number of consecutive 1s in an array #dsa #array #algorithms

#shorts Day 9 Find the maximum number of consecutive 1s in an array #dsa #array #algorithms

HomeCoderrr#shorts Day 9 Find the maximum number of consecutive 1s in an array #dsa #array #algorithms
#shorts Day 9 Find the maximum number of consecutive 1s in an array #dsa #array #algorithms
ChannelPublish DateThumbnail & View CountDownload Video
Channel AvatarPublish Date not found Thumbnail
0 Views
In the video I solved the problem of finding the maximum number of consecutive 1s in an array where I use a for loop to iterate through all the elements in an array if I encounter 1. I increase the number of variables by 1. then by storing the maximum of maxcount and count in maxcount variable if i encounter 0 as arr[i] then i set the value of count to 0 again this way we will always get the value of maximum of consecutive 1s in an array in the variable maximum number.

Please take the opportunity to connect and share this video with your friends and family if you find it useful.