mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-09-29 17:08:49 +08:00
9391f546d6f8c72966ff2d7086c28385909bfa5f
* perf(project_euler): replace problem_092 sol1 with digit DP The previous solution iterated all 10,000,000 values in a Python-level for-loop (~6 s on GitHub Actions CI). The new approach uses digit DP over the decimal digits of (number-1): counts in O(k * 568 * 10) ~ 40k ops how many integers in [0, number-1] have each digit-square sum, then multiplies by a precomputed lookup of whether each sum eventually reaches 89. Running time on the default input drops from ~6 s to ~0.004 s (~1500x). Closes #8594 * perf(project_euler): replace problem_092/sol1 with digit DP * chore: remove workflow artifact (.oss-upstream)
Implementations are for learning purposes only. They may be less efficient than the implementations in the Python standard library. Use them at your discretion.
🚀 Getting Started
📋 Read through our Contribution Guidelines before you contribute.
🌐 Community Channels
We are on Discord and Gitter! Community channels are a great way for you to ask questions and get help. Please join us!
📜 List of Algorithms
See our directory for easier navigation and a better overview of the project.
Description
No description provided
algorithmalgorithm-competitionsalgorithms-implementedalgoscommunity-driveneducationhacktoberfestinterviewlearnpracticepythonsearchessorting-algorithmssorts
Readme
460 MiB
Languages
Python
99.8%
Shell
0.2%