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

Aggressive Cows Problem #305

Open
its-amans opened this issue Oct 8, 2024 · 8 comments
Open

Aggressive Cows Problem #305

its-amans opened this issue Oct 8, 2024 · 8 comments
Labels
hacktoberfest As per guidelines of hactoberfest_24 hacktoberfest2024 As per guidelines of hactoberfest_24 hacktoberfest-accepted As per guidelines of hactoberfest_24

Comments

@its-amans
Copy link

Problem statement

You are given an array 'arr' consisting of 'n' integers which denote the position of a stall.
You are also given an integer 'k' which denotes the number of aggressive cows.
You are given the task of assigning stalls to 'k' cows such that the minimum distance between any two of them is the maximum possible.

Print the maximum possible minimum distance.

Example:
Input: 'n' = 3, 'k' = 2 and 'arr' = {1, 2, 3}

Output: 2

Explanation: The maximum possible minimum distance will be 2 when 2 cows are placed at positions {1, 3}. Here distance between cows is 2.

Constraints :
2 <= 'n' <= 10 ^ 5
2 <= 'k' <= n
0 <= 'arr[i]' <= 10 ^ 9

@its-amans
Copy link
Author

its-amans commented Oct 8, 2024

Hi @HarshwardhanPatil07 ,
I want to add a cpp solution under hacktoberfest for this question . Please assign this problem to me

@HarshwardhanPatil07
Copy link
Owner

Read the guidelines carefully. make sure you follow and star the repository!

@HarshwardhanPatil07 HarshwardhanPatil07 added hacktoberfest2024 As per guidelines of hactoberfest_24 hacktoberfest-accepted As per guidelines of hactoberfest_24 hacktoberfest As per guidelines of hactoberfest_24 labels Oct 12, 2024
@its-amans its-amans reopened this Oct 13, 2024
@S-Shipra
Copy link

please assign me this ....i have already done this(in Geeks for Geeks ) i just want to contribute....

@aryaman0406
Copy link

Hi @HarshwardhanPatil07 Please assign me this task

@Mukta64Chaudhari
Copy link

Hi @HarshwardhanPatil07 , I am interested in contributing to this issue. Please assign it to me.
Thanks!

@Ananyajain2004
Copy link

Please assign me this issue , I want to provide generalized solution in very short time limit.

@SivaNellipudi
Copy link

Hi @Ananyajain2004 I am interested in contributing to this issue. Please assign me.

@Smriti-Prajapati
Copy link

Hey please assign this issue to me for Hactoberfest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest As per guidelines of hactoberfest_24 hacktoberfest2024 As per guidelines of hactoberfest_24 hacktoberfest-accepted As per guidelines of hactoberfest_24
Projects
None yet
Development

No branches or pull requests

8 participants