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 #1035

Closed
wants to merge 9 commits into from
Closed

Aggressive Cows Problem #1035

wants to merge 9 commits into from

Conversation

dewanshiPaul
Copy link
Contributor

@dewanshiPaul dewanshiPaul commented Apr 1, 2022

Related Issue

Proposed Changes

  • Added a binary search problem for level-2

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.

issue link: #802

  • 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)

Output Screenshots

Readme screenshot
image
image
Code:
image
output:
image

@Mrjoy832
Copy link
Collaborator

Mrjoy832 commented Apr 9, 2022

Add image only in readme..dont seperately add into folder

@dewanshiPaul
Copy link
Contributor Author

Ok only this change us required

@Mrjoy832
Copy link
Collaborator

Mrjoy832 commented Apr 9, 2022

Ok only this change us required

put cpp file and readme into a separate folder and create PR ..either Your CPP file and readme will be scattered.

You need to follow particular guidelines for your README , please follow
these guidelines click here
also you can see how your README should look like see here
for more please go through these here

@Mrjoy832
Copy link
Collaborator

Mrjoy832 commented Apr 9, 2022

Listen We are not allowed to merge PR taking 10+ commits ...so kindly keep an eye on this point

@dewanshiPaul
Copy link
Contributor Author

i made necessary changes but cannot upload properly now

@dewanshiPaul
Copy link
Contributor Author

so i deleted files and now want to add changes but not allowing can you help me

@Mrjoy832
Copy link
Collaborator

Mrjoy832 commented Apr 9, 2022

i made necessary changes but cannot upload properly now

Whats the issue you are facing tell in discord LearnCPP group

@dewanshiPaul
Copy link
Contributor Author

ok

@Mrjoy832
Copy link
Collaborator

Mrjoy832 commented Apr 9, 2022

Your readme and cpp will not be together how You created this PR ...previously I said that make a folder of your topic name and in the folder add cpp and readme...by this 2 will be together

@Mrjoy832
Copy link
Collaborator

Mrjoy832 commented Apr 9, 2022

check #1085

@dewanshiPaul
Copy link
Contributor Author

Actually this is totally an new folder and as per recommendations given for problem statement we have to make a folder of level-2 and inside there readme and solution should be there so i kept it that way before

@Mrjoy832
Copy link
Collaborator

Mrjoy832 commented Apr 9, 2022

Actually this is totally an new folder and as per recommendations given for problem statement we have to make a folder of level-2 and inside there readme and solution should be there so i kept it that way before

then create level-2/Cow.cpp and readme file

@Mrjoy832
Copy link
Collaborator

Mrjoy832 commented Apr 9, 2022

Actually this is totally an new folder and as per recommendations given for problem statement we have to make a folder of level-2 and inside there readme and solution should be there so i kept it that way before

Wait I will confirm You..work on other issue

@Mrjoy832
Copy link
Collaborator

Mrjoy832 commented Apr 9, 2022

@Lakhankumawat

@dewanshiPaul
Copy link
Contributor Author

Actually this is totally an new folder and as per recommendations given for problem statement we have to make a folder of level-2 and inside there readme and solution should be there so i kept it that way before

then create level-2/Cow.cpp and readme file

I made like this only before with image in that folder just say me changes later

@Mrjoy832
Copy link
Collaborator

Mrjoy832 commented Apr 9, 2022

Actually this is totally an new folder and as per recommendations given for problem statement we have to make a folder of level-2 and inside there readme and solution should be there so i kept it that way before

then create level-2/Cow.cpp and readme file

I made like this only before with image in that folder just say me changes later

Wait You will be informed

@dewanshiPaul
Copy link
Contributor Author

For this if my commit count increases then it will not be accepted.. if so should i close this and make another pr in another branch and do it?

@dewanshiPaul
Copy link
Contributor Author

@Mrjoy832

@Lakhankumawat
Copy link
Owner

Lakhankumawat commented Apr 9, 2022

Create a new PULL REQUEST with less number of commits in a fresh manner

Your Code Directory will be along with file name please pay attention P-Problem Statements & Solution/2-Level 2/AggressiveCows.cpp

and README changes inside P-Problem Statements & Solution/2-Level 2/README.md

You need to follow particular guidelines for your README , please follow
these guidelines click here
also you can see how your README should look like see here
for more please go through these here

@Lakhankumawat Lakhankumawat added wontfix This will not be worked on 2many-commits and removed enhancement New feature or request Feature-addition GSSoC22 g1j These are PR'S handled by MrJoy labels Apr 9, 2022
@dewanshiPaul dewanshiPaul deleted the master branch April 10, 2022 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants