-
Notifications
You must be signed in to change notification settings - Fork 438
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
Comments
Hi @HarshwardhanPatil07 , |
Read the guidelines carefully. make sure you follow and star the repository! |
please assign me this ....i have already done this(in Geeks for Geeks ) i just want to contribute.... |
Hi @HarshwardhanPatil07 Please assign me this task |
Hi @HarshwardhanPatil07 , I am interested in contributing to this issue. Please assign it to me. |
Please assign me this issue , I want to provide generalized solution in very short time limit. |
Hi @Ananyajain2004 I am interested in contributing to this issue. Please assign me. |
Hey please assign this issue to me for Hactoberfest. |
Hi @HarshwardhanPatil07 Can u assign me this issue. |
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
The text was updated successfully, but these errors were encountered: