LeetCode: Max Consecutive Ones III
Problem:
https://leetcode.com/problems/max-consecutive-ones-iii/description/
Code:
class Solution:
def longestOnes(self, nums: List[int], k: int) -> int:
'''
Sliding Window, can have max k zeroes (can consider them 1)
'''
...
is-power-of-two.hashnode.dev2 min read