honingjs / comments

0 stars 0 forks source link

challenges/leetcode/1004-max-consecutive-ones-iii #10

Open utterances-bot opened 3 weeks ago

utterances-bot commented 3 weeks ago

LeetCode: Max Consecutive Ones III Solution - HoningJS

Find the longest contiguos subsequences with K zeros at most

https://honingjs.com/challenges/leetcode/1004-max-consecutive-ones-iii

grubnubble commented 3 weeks ago

I think you don't need the if check on line 14, right? The while loop will only run if numberOfZeros is greater than k