René's URL Explorer Experiment


Title: R23-T043: Measure Lucas implementation complexity by pruthvirajgojare-source · Pull Request #85 · S-AI-Projects/TheAlgorithms-Python · GitHub

Open Graph Title: R23-T043: Measure Lucas implementation complexity by pruthvirajgojare-source · Pull Request #85 · S-AI-Projects/TheAlgorithms-Python

X Title: R23-T043: Measure Lucas implementation complexity by pruthvirajgojare-source · Pull Request #85 · S-AI-Projects/TheAlgorithms-Python

Description: Description This PR documents and measures the time complexity of the recursive and dynamic Lucas number implementations. It includes a reproducible benchmark for n=5–30 and a plot comparing measured runtimes with their expected growth rates. Related Issue Not applicable; no related issue was specified. Fixes: Not applicable Type of Change Bug Fix New Feature UI/UX Improvement Performance Improvement Tests Documentation Refactoring / Maintenance CI/CD Changes Made Documented Θ(φⁿ) time complexity for recursive_lucas_number, based on T(n) = T(n - 1) + T(n - 2) + O(1). Documented Θ(n) time complexity for dynamic_lucas_number, which performs n loop iterations. Added timeit measurements for every n from 5 through 30, plus CSV results and a plot comparing measured and expected growth. Measurements: recursive runtime grew from about 0.54 μs at n=5 to 71.1 ms at n=30; dynamic runtime grew from about 0.088 μs to 0.352 μs. Fixed call overhead is noticeable in the dynamic measurements at these small input sizes. Screenshots / Recordings Not applicable; this change does not affect a user interface. The benchmark plot is included as evidence: Testing uv run python work/R23-T043/bench.py && uv run pytest maths/lucas_series.py — passed; benchmark completed and both pytest items passed. uv run python -m doctest -v maths/lucas_series.py — passed; all 10 existing doctests passed, including both TypeError paths. uv run --with ruff ruff check maths/lucas_series.py work/R23-T043/bench.py — passed. Checklist I have tested my changes locally. I have added or updated tests, if needed. (No test changes were needed; existing doctests pass.) I have updated documentation, if needed. I have followed the project's coding guidelines. I have run the relevant tests and checks. I have addressed previous review feedback, if applicable. (No previous feedback.) Additional Notes Benchmark script: https://github.com/pruthvirajgojare-source/TheAlgorithms-Python/blob/R23-T043/work/R23-T043/bench.py Timing data: https://github.com/pruthvirajgojare-source/TheAlgorithms-Python/blob/R23-T043/work/R23-T043/lucas_timings.csv The separate upstream/R23-T043 branch contains only the code change and is intended for a later upstream PR; no upstream PR was opened.

Open Graph Description: Description This PR documents and measures the time complexity of the recursive and dynamic Lucas number implementations. It includes a reproducible benchmark for n=5–30 and a plot comparing measur...

X Description: Description This PR documents and measures the time complexity of the recursive and dynamic Lucas number implementations. It includes a reproducible benchmark for n=5–30 and a plot comparing measur...

Opengraph URL: https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ff814299-7b80-3934-407b-81c1890d4a4c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE518:1B42F3:A6742:EC212:6AFDF6D4
html-safe-nonce3da795e9ff9e2b10d4e5f5fc31ee7e22db5e4977a7528ad869201907b11f5aaa
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTE4OjFCNDJGMzpBNjc0MjpFQzIxMjo2QUZERjZENCIsInZpc2l0b3JfaWQiOiIxNzAxNTc0MzgxMjc4MTk3NDYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb8bfdc40e28c2ff23e7e4d6a3517c5c9b6555cf635e8a38faea5a27b74e08f14
hovercard-subject-tagpull_request:5356753436
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///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files
twitter:imagehttps://avatars.githubusercontent.com/u/295325153?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/295325153?s=400&v=4
og:image:altDescription This PR documents and measures the time complexity of the recursive and dynamic Lucas number implementations. It includes a reproducible benchmark for n=5–30 and a plot comparing measur...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneee3343385a977757dd145b28fabf4a119780f2615a5a36c5a89f66c9b3b5616d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/S-AI-Projects/TheAlgorithms-Python git https://github.com/S-AI-Projects/TheAlgorithms-Python.git
octolytics-dimension-user_id351892385
octolytics-dimension-user_loginS-AI-Projects
octolytics-dimension-repository_id1444141022
octolytics-dimension-repository_nwoS-AI-Projects/TheAlgorithms-Python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id63476337
octolytics-dimension-repository_parent_nwoTheAlgorithms/Python
octolytics-dimension-repository_network_root_id63476337
octolytics-dimension-repository_network_root_nwoTheAlgorithms/Python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release43ae91995f6e2d5ff7a491f3de438f1f723adeaa
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FS-AI-Projects%2FTheAlgorithms-Python%2Fpull%2F85%2Ffiles
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%2FS-AI-Projects%2FTheAlgorithms-Python%2Fpull%2F85%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=S-AI-Projects%2FTheAlgorithms-Python
Reloadhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files
Reloadhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files
Reloadhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files
S-AI-Projectshttps://github.com/S-AI-Projects
TheAlgorithms-Pythonhttps://github.com/S-AI-Projects/TheAlgorithms-Python
Codehttps://github.com/S-AI-Projects/TheAlgorithms-Python
Issues60 (60)https://github.com/S-AI-Projects/TheAlgorithms-Python/issues
Pull requests39 (39)https://github.com/S-AI-Projects/TheAlgorithms-Python/pulls
Actionshttps://github.com/S-AI-Projects/TheAlgorithms-Python/actions
Projectshttps://github.com/S-AI-Projects/TheAlgorithms-Python/projects
Security and qualityhttps://github.com/S-AI-Projects/TheAlgorithms-Python/security
Insightshttps://github.com/S-AI-Projects/TheAlgorithms-Python/insights
Sign up for GitHub https://github.com/signup?return_to=%2FS-AI-Projects%2FTheAlgorithms-Python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FS-AI-Projects%2FTheAlgorithms-Python%2Fissues%2Fnew%2Fchoose
pruthvirajgojare-sourcehttps://github.com/pruthvirajgojare-source
S-AI-Projects:masterhttps://github.com/S-AI-Projects/TheAlgorithms-Python/tree/master
pruthvirajgojare-source:R23-T043https://github.com/pruthvirajgojare-source/TheAlgorithms-Python/tree/R23-T043
Conversation 0 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85
Commits 2 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/commits
Checks 0 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/checks
Files changed https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files
Please reload this pagehttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files
R23-T043: Measure Lucas implementation complexity https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#top
Show all changes 2 commits https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files
1eefd46 Document Lucas complexities with benchmark evidence pruthvirajgojare-source Nov 17, 2026 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/commits/1eefd467592d66c3048536b02a88da8fdbf9de8f
c59a747 Refine Lucas benchmark script pruthvirajgojare-source Nov 17, 2026 https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/commits/c59a74739592c91b4b4abf8cb56b56a6a2ce9c9f
Clear filters https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files
Please reload this pagehttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files
Please reload this pagehttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files
lucas_series.py https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-0b1d75b5f5b3cb4b4bb2339b61e08686ec11988918d23d4bf65d95811302d739
bench.py https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-b61ed9ed3b3aa37c5015c24ea87e21a6d6695554cc7b69cbc580777417dc6e82
lucas_complexity.png https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-9242cd912dcae00574a9a93ac81427da07f7c725a2f229baeac008f4a6a60928
lucas_timings.csv https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-bf6f6e84bb1bb7d5e0eb1ddac20467818d13a91d2bf20c480df92d9062eac1b0
maths/lucas_series.pyhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-0b1d75b5f5b3cb4b4bb2339b61e08686ec11988918d23d4bf65d95811302d739
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/c59a74739592c91b4b4abf8cb56b56a6a2ce9c9f/maths/lucas_series.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/{{ revealButtonHref }}
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-0b1d75b5f5b3cb4b4bb2339b61e08686ec11988918d23d4bf65d95811302d739
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-0b1d75b5f5b3cb4b4bb2339b61e08686ec11988918d23d4bf65d95811302d739
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-0b1d75b5f5b3cb4b4bb2339b61e08686ec11988918d23d4bf65d95811302d739
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-0b1d75b5f5b3cb4b4bb2339b61e08686ec11988918d23d4bf65d95811302d739
work/R23-T043/bench.pyhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-b61ed9ed3b3aa37c5015c24ea87e21a6d6695554cc7b69cbc580777417dc6e82
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/c59a74739592c91b4b4abf8cb56b56a6a2ce9c9f/work/R23-T043/bench.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/{{ revealButtonHref }}
work/R23-T043/lucas_complexity.pnghttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-9242cd912dcae00574a9a93ac81427da07f7c725a2f229baeac008f4a6a60928
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/c59a74739592c91b4b4abf8cb56b56a6a2ce9c9f/work/R23-T043/lucas_complexity.png
Open in desktop https://desktop.github.com
Reload?https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files
work/R23-T043/lucas_timings.csvhttps://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/files#diff-bf6f6e84bb1bb7d5e0eb1ddac20467818d13a91d2bf20c480df92d9062eac1b0
View file https://github.com/S-AI-Projects/TheAlgorithms-Python/blob/c59a74739592c91b4b4abf8cb56b56a6a2ce9c9f/work/R23-T043/lucas_timings.csv
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/S-AI-Projects/TheAlgorithms-Python/pull/85/{{ revealButtonHref }}
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.