Skip to content

feat: Added Graham Scan Algorithm. #1836

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

Merged
merged 55 commits into from
Nov 14, 2021
Merged

Conversation

Lazeeez
Copy link
Contributor

@Lazeeez Lazeeez commented Nov 3, 2021

Description of Change

There is already a Jarvis’s Algorithm implementation for Convex Hull. But, The worst case time complexity of Jarvis’s Algorithm is O(n^2). Using Graham’s scan algorithm, we can find Convex Hull in O(nLogn) time. Following is Graham’s algorithm

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Added Graham Scan Algorithm implementation for Convex Hull.

Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

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

Awesome work! 👀🎉

Could you please fix clang-tidy warnings?
Let us know if you need any help! 😄

@Panquesito7 Panquesito7 added automated tests are failing Do not merge until tests pass enhancement New feature or request requested changes changes have been requested labels Nov 3, 2021
@Panquesito7 Panquesito7 removed the automated tests are failing Do not merge until tests pass label Nov 4, 2021
@Lazeeez
Copy link
Contributor Author

Lazeeez commented Nov 4, 2021

well

@Panquesito7 Panquesito7 added the automated tests are failing Do not merge until tests pass label Nov 4, 2021
@github-actions github-actions bot force-pushed the Lazeeez branch 2 times, most recently from f1adb67 to d31d584 Compare November 8, 2021 06:38
Panquesito7
Panquesito7 previously approved these changes Nov 8, 2021
Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

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

Amazing work! 🚀 Thank you so much for your contribution! 😄👍

@Panquesito7 Panquesito7 added approved Approved; waiting for merge and removed requested changes changes have been requested labels Nov 8, 2021
@Panquesito7
Copy link
Member

Will merge for now. If any of you (@Amino19, @ayaankhan98, @mishraabhinn, or anyone else) have any objections, please comment here and make a separate PR to fix that. Thank you. 🙂

@Panquesito7 Panquesito7 merged commit ea76786 into TheAlgorithms:master Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Approved; waiting for merge enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants