René's URL Explorer Experiment


Title: Add input validation to cyclic_sort to prevent invalid inputs by Gairola788 · Pull Request #15009 · TheAlgorithms/Python · GitHub

Open Graph Title: Add input validation to cyclic_sort to prevent invalid inputs by Gairola788 · Pull Request #15009 · TheAlgorithms/Python

X Title: Add input validation to cyclic_sort to prevent invalid inputs by Gairola788 · Pull Request #15009 · TheAlgorithms/Python

Description: All Algorithms implemented in Python. Contribute to TheAlgorithms/Python development by creating an account on GitHub.

Open Graph Description: Describe your change: Added input validation to the cyclic_sort algorithm to prevent invalid inputs from causing infinite loops or incorrect results. The function now raises a ValueError when: the...

X Description: Describe your change: Added input validation to the cyclic_sort algorithm to prevent invalid inputs from causing infinite loops or incorrect results. The function now raises a ValueError when: the...

Opengraph URL: https://github.com/TheAlgorithms/Python/pull/15009

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:47d65389-68c0-a9d5-0a12-12e0231bdeae
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD5FA:1D4A3:15175A9:1CCC75D:6AFB7657
html-safe-noncee711623e53dce8b23dab2b0f3c410e884db3871064eb3ade8f5792dc0c43f78a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUZBOjFENEEzOjE1MTc1QTk6MUNDQzc1RDo2QUZCNzY1NyIsInZpc2l0b3JfaWQiOiIxNDYzODQzNjI1MDAyMzAxMDE1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd8d17858282478c97b7d11871691d74088d91e8619c03bbbe0275e2a4fe7e49e
hovercard-subject-tagpull_request:4218296984
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/TheAlgorithms/Python/15009/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/3c1a9a5cad4b62a8ac25d05cba55be8b309f61373ee00b61b61cb42e51d3aad3/TheAlgorithms/Python/pull/15009
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3c1a9a5cad4b62a8ac25d05cba55be8b309f61373ee00b61b61cb42e51d3aad3/TheAlgorithms/Python/pull/15009
og:image:altDescribe your change: Added input validation to the cyclic_sort algorithm to prevent invalid inputs from causing infinite loops or incorrect results. The function now raises a ValueError when: the...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameGairola788
hostnamegithub.com
expected-hostnamegithub.com
None0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48
turbo-cache-controlno-cache
go-importgithub.com/TheAlgorithms/Python git https://github.com/TheAlgorithms/Python.git
octolytics-dimension-user_id20487725
octolytics-dimension-user_loginTheAlgorithms
octolytics-dimension-repository_id63476337
octolytics-dimension-repository_nwoTheAlgorithms/Python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id63476337
octolytics-dimension-repository_network_root_nwoTheAlgorithms/Python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2e8872b770cc4d5d0cc1f2026afab747a268e2ce
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/TheAlgorithms/Python/pull/15009#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTheAlgorithms%2FPython%2Fpull%2F15009
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTheAlgorithms%2FPython%2Fpull%2F15009
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=TheAlgorithms%2FPython
Reloadhttps://github.com/TheAlgorithms/Python/pull/15009
Reloadhttps://github.com/TheAlgorithms/Python/pull/15009
Reloadhttps://github.com/TheAlgorithms/Python/pull/15009
TheAlgorithmshttps://github.com/TheAlgorithms
Pythonhttps://github.com/TheAlgorithms/Python
Codehttps://github.com/TheAlgorithms/Python
Issues14 (14)https://github.com/TheAlgorithms/Python/issues
Pull requests104 (104)https://github.com/TheAlgorithms/Python/pulls
Discussionshttps://github.com/TheAlgorithms/Python/discussions
Actionshttps://github.com/TheAlgorithms/Python/actions
Projectshttps://github.com/TheAlgorithms/Python/projects
Wikihttps://github.com/TheAlgorithms/Python/wiki
Security and qualityhttps://github.com/TheAlgorithms/Python/security
Insightshttps://github.com/TheAlgorithms/Python/pulse
https://github.com/TheAlgorithms/Python
cclausshttps://github.com/cclauss
TheAlgorithms:masterhttps://github.com/TheAlgorithms/Python/tree/master
Gairola788:fix-cyclic-sort-validationhttps://github.com/Gairola788/PythonDev/tree/fix-cyclic-sort-validation
Conversationhttps://github.com/TheAlgorithms/Python/pull/15009
Commits8 (8)https://github.com/TheAlgorithms/Python/pull/15009/commits
Checkshttps://github.com/TheAlgorithms/Python/pull/15009/checks
Files changedhttps://github.com/TheAlgorithms/Python/pull/15009/files
Add input validation to cyclic_sort to prevent invalid inputshttps://github.com/TheAlgorithms/Python/pull/15009#top
cclausshttps://github.com/cclauss
TheAlgorithms:masterhttps://github.com/TheAlgorithms/Python/tree/master
Gairola788:fix-cyclic-sort-validationhttps://github.com/Gairola788/PythonDev/tree/fix-cyclic-sort-validation
https://github.com/Gairola788
Gairola788https://github.com/Gairola788
Aug 6, 2026https://github.com/TheAlgorithms/Python/pull/15009#issue-5078113789
Please reload this pagehttps://github.com/TheAlgorithms/Python/pull/15009
#14898https://github.com/TheAlgorithms/Python/issues/14898
#14899https://github.com/TheAlgorithms/Python/pull/14899
#15026https://github.com/TheAlgorithms/Python/pull/15026
#15050https://github.com/TheAlgorithms/Python/pull/15050
CONTRIBUTING.mdhttps://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md
cyclic_sort.py has no input validation, causes infinite loop on invalid input #14898https://github.com/TheAlgorithms/Python/issues/14898
Please reload this pagehttps://github.com/TheAlgorithms/Python/pull/15009
Gairola788https://github.com/Gairola788
August 6, 2026 11:09https://github.com/TheAlgorithms/Python/pull/15009#commits-pushed-6379ae3
https://github.com/Gairola788
Add input validation to cyclic_sorthttps://github.com/TheAlgorithms/Python/pull/15009/commits/6379ae3fc631d786407c6c340924002af403a9b9
6379ae3https://github.com/TheAlgorithms/Python/pull/15009/commits/6379ae3fc631d786407c6c340924002af403a9b9
https://github.com/Gairola788
Add input validation to cyclic_sorthttps://github.com/TheAlgorithms/Python/pull/15009/commits/163b615d196bd3797fa9cb32918371a2fc939406
163b615https://github.com/TheAlgorithms/Python/pull/15009/commits/163b615d196bd3797fa9cb32918371a2fc939406
https://github.com/apps/algorithms-keeper
algorithms-keeperhttps://github.com/apps/algorithms-keeper
enhancement https://github.com/TheAlgorithms/Python/issues?q=state%3Aopen%20label%3Aenhancement
awaiting reviews https://github.com/TheAlgorithms/Python/issues?q=state%3Aopen%20label%3A%22awaiting%20reviews%22
Aug 6, 2026https://github.com/TheAlgorithms/Python/pull/15009#event-29050173477
https://github.com/marketplace/pre-commit-ci
[pre-commit.ci] auto fixes from pre-commit.com hookshttps://github.com/TheAlgorithms/Python/pull/15009/commits/2a080f271f99ff0a98348ec01c1a498065508206
2a080f2https://github.com/TheAlgorithms/Python/pull/15009/commits/2a080f271f99ff0a98348ec01c1a498065508206
https://pre-commit.cihttps://pre-commit.ci
https://github.com/apps/algorithms-keeper
algorithms-keeperhttps://github.com/apps/algorithms-keeper
tests are failing https://github.com/TheAlgorithms/Python/issues?q=state%3Aopen%20label%3A%22tests%20are%20failing%22
Aug 6, 2026https://github.com/TheAlgorithms/Python/pull/15009#event-29050318254
Gairola788https://github.com/Gairola788
August 6, 2026 11:57https://github.com/TheAlgorithms/Python/pull/15009#commits-pushed-9d48bf8
https://github.com/Gairola788
f string literal bug resolvedhttps://github.com/TheAlgorithms/Python/pull/15009/commits/9d48bf882dbc98108d934e1ff180ac8fda3787b6
9d48bf8https://github.com/TheAlgorithms/Python/pull/15009/commits/9d48bf882dbc98108d934e1ff180ac8fda3787b6
https://github.com/marketplace/pre-commit-ci
[pre-commit.ci] auto fixes from pre-commit.com hookshttps://github.com/TheAlgorithms/Python/pull/15009/commits/09f3e803b9b9c1e2dab2eb8a8526e212f0f5c88a
09f3e80https://github.com/TheAlgorithms/Python/pull/15009/commits/09f3e803b9b9c1e2dab2eb8a8526e212f0f5c88a
https://pre-commit.cihttps://pre-commit.ci
https://github.com/apps/algorithms-keeper
algorithms-keeperhttps://github.com/apps/algorithms-keeper
tests are failing https://github.com/TheAlgorithms/Python/issues?q=state%3Aopen%20label%3A%22tests%20are%20failing%22
Aug 6, 2026https://github.com/TheAlgorithms/Python/pull/15009#event-29051745637
https://github.com/mindaugl
mindauglhttps://github.com/mindaugl
Aug 6, 2026 https://github.com/TheAlgorithms/Python/pull/15009#pullrequestreview-4874464969
View reviewed changes https://github.com/TheAlgorithms/Python/pull/15009/files/09f3e803b9b9c1e2dab2eb8a8526e212f0f5c88a
https://github.com/Claudiocli
Claudioclihttps://github.com/Claudiocli
Aug 7, 2026 https://github.com/TheAlgorithms/Python/pull/15009#pullrequestreview-4881784471
View reviewed changes https://github.com/TheAlgorithms/Python/pull/15009/files/09f3e803b9b9c1e2dab2eb8a8526e212f0f5c88a
Claudioclihttps://github.com/Claudiocli
https://github.com/TheAlgorithms/Python/pull/15009#pullrequestreview-4881784471
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/TheAlgorithms/Python/pull/15009
https://github.com/Gairola788
Gairola788https://github.com/Gairola788
Aug 7, 2026https://github.com/TheAlgorithms/Python/pull/15009#issuecomment-5217603966
Please reload this pagehttps://github.com/TheAlgorithms/Python/pull/15009
https://github.com/daltino
daltinohttps://github.com/daltino
Aug 11, 2026 https://github.com/TheAlgorithms/Python/pull/15009#pullrequestreview-4902008840
View reviewed changes https://github.com/TheAlgorithms/Python/pull/15009/files/09f3e803b9b9c1e2dab2eb8a8526e212f0f5c88a
daltinohttps://github.com/daltino
https://github.com/TheAlgorithms/Python/pull/15009#pullrequestreview-4902008840
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/TheAlgorithms/Python/pull/15009
Gairola788https://github.com/Gairola788
August 11, 2026 22:42https://github.com/TheAlgorithms/Python/pull/15009#commits-pushed-eb72cc3
https://github.com/Gairola788
test cyclic sort input validationhttps://github.com/TheAlgorithms/Python/pull/15009/commits/eb72cc34e22bdb1b8f89033b4f57da4539601db5
eb72cc3https://github.com/TheAlgorithms/Python/pull/15009/commits/eb72cc34e22bdb1b8f89033b4f57da4539601db5
https://github.com/marketplace/pre-commit-ci
[pre-commit.ci] auto fixes from pre-commit.com hookshttps://github.com/TheAlgorithms/Python/pull/15009/commits/4012c49f80907d2ce7d5965fc41cf3edf1aa7030
4012c49https://github.com/TheAlgorithms/Python/pull/15009/commits/4012c49f80907d2ce7d5965fc41cf3edf1aa7030
https://pre-commit.cihttps://pre-commit.ci
https://github.com/Gairola788
Gairola788https://github.com/Gairola788
Aug 11, 2026https://github.com/TheAlgorithms/Python/pull/15009#issuecomment-5256522428
Please reload this pagehttps://github.com/TheAlgorithms/Python/pull/15009
https://github.com/Gairola788
Gairola788https://github.com/Gairola788
daltinohttps://github.com/daltino
August 26, 2026 15:50https://github.com/TheAlgorithms/Python/pull/15009#event-30053437065
https://github.com/Gairola788
Merge branch 'master' into fix-cyclic-sort-validationhttps://github.com/TheAlgorithms/Python/pull/15009/commits/abb502627f2abb1ce5ae0b444e658f509551ef64
abb5026https://github.com/TheAlgorithms/Python/pull/15009/commits/abb502627f2abb1ce5ae0b444e658f509551ef64
https://github.com/priya-sundaram-dev
priya-sundaram-devhttps://github.com/priya-sundaram-dev
Sep 9, 2026 https://github.com/TheAlgorithms/Python/pull/15009#ref-issue-5242842322
priya-sundaram-dev as a triager? #15081 https://github.com/TheAlgorithms/Python/issues/15081
https://github.com/cclauss
cclausshttps://github.com/cclauss
Sep 9, 2026 https://github.com/TheAlgorithms/Python/pull/15009#pullrequestreview-5154119949
View reviewed changes https://github.com/TheAlgorithms/Python/pull/15009/files/abb502627f2abb1ce5ae0b444e658f509551ef64
https://github.com/apps/algorithms-keeper
algorithms-keeperhttps://github.com/apps/algorithms-keeper
awaiting reviews https://github.com/TheAlgorithms/Python/issues?q=state%3Aopen%20label%3A%22awaiting%20reviews%22
Sep 9, 2026https://github.com/TheAlgorithms/Python/pull/15009#event-30827358008
https://github.com/cclauss
cclausshttps://github.com/cclauss
c2318abhttps://github.com/TheAlgorithms/Python/commit/c2318ab63c820b043242695ce15f74b52714c29a
Sep 9, 2026https://github.com/TheAlgorithms/Python/pull/15009#event-30827364882
Please reload this pagehttps://github.com/TheAlgorithms/Python/pull/15009
https://github.co/hiddenchars
https://github.com/TheAlgorithms/Python/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTheAlgorithms%2FPython%2Fpull%2F15009
https://github.com/cclauss
cclauss https://github.com/cclauss
https://github.com/TheAlgorithms/Python/pull/15009/files/abb502627f2abb1ce5ae0b444e658f509551ef64
https://github.com/daltino
daltino https://github.com/daltino
https://github.com/Claudiocli
Claudiocli https://github.com/Claudiocli
https://github.com/TheAlgorithms/Python/pull/15009/files/09f3e803b9b9c1e2dab2eb8a8526e212f0f5c88a
https://github.com/mindaugl
mindaugl https://github.com/mindaugl
https://github.com/TheAlgorithms/Python/pull/15009/files/09f3e803b9b9c1e2dab2eb8a8526e212f0f5c88a
Please reload this pagehttps://github.com/TheAlgorithms/Python/pull/15009
enhancement https://github.com/TheAlgorithms/Python/issues?q=state%3Aopen%20label%3Aenhancement
cyclic_sort.py has no input validation, causes infinite loop on invalid input https://github.com/TheAlgorithms/Python/issues/14898
Please reload this pagehttps://github.com/TheAlgorithms/Python/pull/15009
https://github.com/Gairola788
https://github.com/daltino
https://github.com/cclauss
https://github.com/Claudiocli
https://github.com/mindaugl
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.