Skip to content

Add Radix Binary Search with documentation and doctests - #15677

Open
dpittaluga76 wants to merge 2 commits into
TheAlgorithms:masterfrom
dpittaluga76:feat/radix-binary-search
Open

dpittaluga76 wants to merge 2 commits into
TheAlgorithms:masterfrom
dpittaluga76:feat/radix-binary-search

Conversation

@dpittaluga76

@dpittaluga76 dpittaluga76 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Describe your change

Adds searches/radix_binary_search.py, implementing Radix Binary Search for sorted integer sequences.

The implementation builds a prefix directory and performs binary search within the selected bucket. It returns the first matching index, or None when the target is absent. It supports negative integers, duplicates, and empty inputs.

Includes explanatory comments, a worked example, input validation, 17 passing doctests, and a reference to the SOSD paper. The implementation was reviewed and tested.

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Add or change doctests? -- Doctests accompany the new algorithm; no existing algorithm or tests are modified.
  • Documentation change? -- Comments and docstrings within the new file.

Checklist

  • 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 locally. GitHub CI results are pending.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.

@algorithms-keeper algorithms-keeper Bot added the awaiting reviews This PR is ready to be reviewed label Oct 30, 2026

This branch has not been deployed

No deployments
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.

1 participant