-
Notifications
You must be signed in to change notification settings - Fork 267
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
Implemented Introsort #549
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #549 +/- ##
=============================================
- Coverage 97.601% 97.552% -0.050%
=============================================
Files 34 34
Lines 4295 4331 +36
=============================================
+ Hits 4192 4225 +33
- Misses 103 106 +3
|
pydatastructs/linear_data_structures/tests/benchmarks/test_algorithms.py
Outdated
Show resolved
Hide resolved
Co-authored-by: ਗਗਨਦੀਪ ਸਿੰਘ (Gagandeep Singh) <[email protected]>
Co-authored-by: ਗਗਨਦੀਪ ਸਿੰਘ (Gagandeep Singh) <[email protected]>
return _algorithms.intro_sort(array, **kwargs) | ||
|
||
# from pydatastructs import Stack | ||
# Always sorts in increasing order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is because of heapsort's limitation, right? Please mention here about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is because of the current heapsort function's limitation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I write that as a comment in the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes made.
I've done the mentioned changes: Added comment to code that a custom compactor cannot be taken due to heapsort's limitation. |
Co-authored-by: ਗਗਨਦੀਪ ਸਿੰਘ (Gagandeep Singh) <[email protected]>
1 check didn't pass, I believe this is due to some backend issue.
|
All checks pass, the code suggested had next_permutation by mistake, which I changed to my function: intro_sort |
Thank you for your help! @czgdp1807 Also please check the issue I faced, which I've mentioned here: #547 , along with the solution. |
References to other Issues or PRs or Relevant literature
Fixes #545
Brief description of what is fixed or changed
Implemented Introsort.