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 Statement #1094

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

dewanshiPaul
Copy link
Contributor

Related Issue

Proposed Changes

  • Added a binary seach level-2 problem solution
  • Added readme for it with explanations

Checklist

  • ✅ My code follows the code style of this project.
  • 📝 My change requires a change to the README.
  • 🎀 I have updated the README accordingly.
  • 👀 I have read the CONTRIBUTING document.
  • ✨ I have added tests to cover my changes.
  • 🚩 All new and existing tests passed.
  • 🌟 ed the repo

This is code for a problem known as aggressive cows. The statement is:
There is a new barn with N stalls and C cows. The stalls are located on a straight line at positions x1,….,xN (0 <= xi <= 1,000,000,000). We want to assign the cows to the stalls, such that the minimum distance between any two of them is as large as possible. What is the largest minimum distance?

Explanation of the problem statement with approach discussion and time complexity is added in readme file. This is a level 2 problem which was not present in repo and hence gives understanding of binary search related problems.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Screenshots

Screenshot 1 Screenshot 2
Readme Code
image image

Output Screenshot

image

@Mrjoy832 Mrjoy832 added enhancement New feature or request Feature-addition problem-statement-addition GSSoC22 README changes-pending g1j These are PR'S handled by MrJoy admin Approved and removed g1j These are PR'S handled by MrJoy labels Apr 10, 2022
Copy link
Owner

@Lakhankumawat Lakhankumawat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉✨
Your contribution looks great keep contributing like this .
Contiuous Good Contribution 1

Mention this Pr in your next PRs and you will have a chance to get your levels increased 🎀

@Lakhankumawat Lakhankumawat merged commit df454da into Lakhankumawat:main Apr 11, 2022
@Lakhankumawat Lakhankumawat added Level1 CGC Continuous Good Contribution Your Pr's have chances of higher level and removed README admin changes-pending labels Apr 11, 2022
@Lakhankumawat
Copy link
Owner

@all-contributors please add @dewanshiPaul code ,

@allcontributors
Copy link
Contributor

@Lakhankumawat

I've put up a pull request to add @dewanshiPaul! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved CGC Continuous Good Contribution Your Pr's have chances of higher level enhancement New feature or request Feature-addition GSSoC22 Level1 problem-statement-addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants