Skip to content

[Feature Request]: Add leetCode Problem 995 #2041

Closed
@Saipradyumnagoud

Description

@Saipradyumnagoud

Is there an existing issue for this?

  • I have searched the existing issues

Feature Description

You are given a binary array nums and an integer k.

A k-bit flip is choosing a subarray of length k from nums and simultaneously changing every 0 in the subarray to 1, and every 1 in the subarray to 0.

Return the minimum number of k-bit flips required so that there is no 0 in the array. If it is not possible, return -1.

A subarray is a contiguous part of an array.

Use Case

Input: nums = [0,1,0], k = 1
Output: 2

Benefits

No response

Add ScreenShots

No response

Priority

High

Record

  • I have read the Contributing Guidelines
  • I'm a GSSOC'24 contributor
  • I have starred the repository

Metadata

Metadata

Labels

CodeHarborHub - Thanks for creating an issue!GSSOC'24GirlScript Summer of Code | ContributordocumentationImprovements or additions to documentationgssocGirlScript Summer of Code | Contributorlevel1GirlScript Summer of Code | Contributor's Levels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions