Skip to content

sorts: make comb_sort generic for comparable items - #15288

Merged
cclauss merged 5 commits into
TheAlgorithms:masterfrom
otrisha:feat/comb-sort-comparable
Sep 12, 2026
Merged

cclauss merged 5 commits into
TheAlgorithms:masterfrom
otrisha:feat/comb-sort-comparable

Conversation

@otrisha

@otrisha otrisha commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

. Make comb_sort generic over comparable item types
. Add doctest coverage for strings and floats
. Include comb_sort in the shared non-comparable-item rejection test

Part of #15234

AI assistance was used to help draft and review the implementation; I reviewed the changes before submission.

  • I have read CONTRIBUTING.md.
  • [] This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues, then the description above includes the issue number(s) with a closing keyword: "Fixes #ISSUE-NUMBER".

@algorithms-keeper algorithms-keeper Bot added awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files labels Sep 12, 2026
Comment thread sorts/comb_sort.py Outdated
@algorithms-keeper algorithms-keeper Bot added the tests are failing Do not merge until tests pass label Sep 12, 2026
Comment thread sorts/comb_sort.py Outdated
@algorithms-keeper algorithms-keeper Bot removed the awaiting reviews This PR is ready to be reviewed label Sep 12, 2026
Comment thread sorts/comb_sort.py Outdated
@algorithms-keeper algorithms-keeper Bot added awaiting reviews This PR is ready to be reviewed and removed tests are failing Do not merge until tests pass labels Sep 12, 2026
@cclauss
cclauss merged commit d502013 into TheAlgorithms:master Sep 12, 2026
5 of 6 checks passed
@algorithms-keeper algorithms-keeper Bot removed the awaiting reviews This PR is ready to be reviewed label Sep 12, 2026
@cclauss

cclauss commented Sep 12, 2026

Copy link
Copy Markdown
Member

Awesome work! Thanks for doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants