FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: raise ValueError on negative inputs in radix_sort by deepshekhardas · Pull Request #15040 · TheAlgorithms/Python · GitHub

fix: raise ValueError on negative inputs in radix_sort - #15040

Open
deepshekhardas wants to merge 1 commit into
TheAlgorithms:masterfrom
deepshekhardas:fix-14950-radix-negative
Open

fix: raise ValueError on negative inputs in radix_sort#15040
deepshekhardas wants to merge 1 commit into
TheAlgorithms:masterfrom
deepshekhardas:fix-14950-radix-negative

Conversation

Copy link
Copy Markdown

Describe your change

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Add, change, or clarify documentation?

What does this implement/fix?

adix_sort() silently produced wrong output for negative numbers (digit extraction via int(i / placement) % RADIX). Raise a clear ValueError instead.

Additional comments?

None.

Fixes #14950

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sorts/radix_sort.py: radix_sort() does not raise exception for negative inputs

1 participant


Back | FazBrowse Home | New Git URL