Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Policeman catches thieves #6279

Open
1 of 4 tasks
Op-panda opened this issue Oct 21, 2021 · 1 comment
Open
1 of 4 tasks

Policeman catches thieves #6279

Op-panda opened this issue Oct 21, 2021 · 1 comment

Comments

@Op-panda
Copy link
Contributor

This is a(n):

  • New algorithm
  • Update to an existing algorithm
  • Error
  • Proposal to the Repository

Details:

Greedy Algorithm application:
Given an array of size n that has the following specifications:

Each element in the array contains either a policeman or a thief.
Each policeman can catch only one thief.
A policeman cannot catch a thief who is more than K units away from the policeman.

We need to find the maximum number of thieves that can be caught.

@Op-panda
Copy link
Contributor Author

@AdiChat please assign me this issue. I am a participant of Hacktoberfest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant