Title: bug(searches): jump_search raises IndexError for empty list input · Issue #15085 · TheAlgorithms/Python · GitHub
Open Graph Title: bug(searches): jump_search raises IndexError for empty list input · Issue #15085 · TheAlgorithms/Python
X Title: bug(searches): jump_search raises IndexError for empty list input · Issue #15085 · TheAlgorithms/Python
Description: Repository commit f5988cc Python version (python --version) Python 3.14.6 Dependencies version (pip freeze) N/A (Standard Library only) Expected behavior jump_search([], 5) should return -1 when given an empty list or sequence, as an emp...
Open Graph Description: Repository commit f5988cc Python version (python --version) Python 3.14.6 Dependencies version (pip freeze) N/A (Standard Library only) Expected behavior jump_search([], 5) should return -1 when gi...
X Description: Repository commit f5988cc Python version (python --version) Python 3.14.6 Dependencies version (pip freeze) N/A (Standard Library only) Expected behavior jump_search([], 5) should return -1 when gi...
Opengraph URL: https://github.com/TheAlgorithms/Python/issues/15085
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug(searches): jump_search raises IndexError for empty list input","articleBody":"### Repository commit\n\nf5988cc09713315817df6a7e327e258013a94440\n\n### Python version (python --version)\n\nPython 3.14.6\n\n### Dependencies version (pip freeze)\n\nN/A (Standard Library only)\n\n\n### Expected behavior\n\n`jump_search([], 5)` should return `-1` when given an empty list or sequence, as an empty collection cannot contain the target search item.\n\n\n### Actual behavior\n\nCalling `jump_search([], 5)` raises an `IndexError: list index out of range`:\n\n```python\nTraceback (most recent call last):\n File \"searches/jump_search.py\", line 43, in jump_search\n while arr[min(step, arr_size) - 1] \u003c item:\nIndexError: list index out of range\n","author":{"url":"https://github.com/Kanika0306","@type":"Person","name":"Kanika0306"},"datePublished":"2026-08-25T21:58:02Z","url":"https://github.com/TheAlgorithms/Python/issues/15085"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:972484d3-ca72-1542-1508-bcc8c31b3c00 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 97D0:223A5F:136A096:1AAAB30:6AFB7390 |
| html-safe-nonce | eee68488666ed3b2be3daba04b14baeffb4226b8204a279a84f5d44c0eb13084 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0QwOjIyM0E1RjoxMzZBMDk2OjFBQUFCMzA6NkFGQjczOTAiLCJ2aXNpdG9yX2lkIjoiMTU0ODU5NjY1NzAzNTg5OTc5MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ee72c707720bd7bdfaf7fb24c98e3bfb912e2695d25c5f307c14de82c2420af0 |
| hovercard-subject-tag | issue:5251082048 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TheAlgorithms/Python/15085/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d813c155777c472ad697dbe2efb0d1cc896f553c85c029f46aaf5167c2600125/TheAlgorithms/Python/issues/15085 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d813c155777c472ad697dbe2efb0d1cc896f553c85c029f46aaf5167c2600125/TheAlgorithms/Python/issues/15085 |
| og:image:alt | Repository commit f5988cc Python version (python --version) Python 3.14.6 Dependencies version (pip freeze) N/A (Standard Library only) Expected behavior jump_search([], 5) should return -1 when gi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Kanika0306 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48 |
| turbo-cache-control | no-preview |
| go-import | github.com/TheAlgorithms/Python git https://github.com/TheAlgorithms/Python.git |
| octolytics-dimension-user_id | 20487725 |
| octolytics-dimension-user_login | TheAlgorithms |
| octolytics-dimension-repository_id | 63476337 |
| octolytics-dimension-repository_nwo | TheAlgorithms/Python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 63476337 |
| octolytics-dimension-repository_network_root_nwo | TheAlgorithms/Python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2e8872b770cc4d5d0cc1f2026afab747a268e2ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width