TheAlgorithms /Python
All Algorithms implemented in Python
★ 226,145⑂ 51,319👁 5,933⑃ 13,146● 1,782▤ 0
More from this author
+32
Daily
+169
Weekly
226,145
stars
51,319
forks
5,933
watchers
13,146
prs
1,782
issues
0
releases
README
The Algorithms - Python
All algorithms implemented in Python - for education 📚
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! 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.Top issues
#15187Tracking: complete the `ty` gradual-typing baseline (un-ignore rules; PEP 723 blocker astral-sh/ty#691)11 comments · 2026-09-04#15695Add a workflow CI to validate the Devcontainer environment3 comments · 2026-11-07#15656binomial_distribution overflows at 171 trials even when the result is representable3 comments · 2026-10-28#15655continued_fraction uses float division, producing invalid terms for large integers and raising OverflowError2 comments · 2026-10-28#15696Optimize the linting's rules with RUff and Zizmor1 comments · 2026-11-07#15637ciphers/base58.py is a copy of base64_cipher.py — no Base58 implementation exists in the file1 comments · 2026-10-25#15636ciphers/base32.py and ciphers/base85.py encode Unicode code points instead of bytes: output diverges from the spec for non-ASCII, round-trips corrupt chars >= U+0400, arbitrary bytes crash1 comments · 2026-10-24#15633other/password.py: alternative_password_generator ignores the requested length when the required characters exceed it1 comments · 2026-10-24
Discussions
#15742What is the most effective way to optimize slow SQL queries?1 comments · 2026-11-12#15741When should I use Python's asyncio instead of multiprocessing?1 comments · 2026-11-12#15740How can I reduce memory consumption when processing millions of records in Python?2 comments · 2026-11-12#15739Is there a faster alternative to Python's built-in set.intersection() for large datasets?3 comments · 2026-11-12#15738What is the best way to reduce memory consumption when processing millions of unique elements in Python?1 comments · 2026-11-12#15737Is there a more efficient approach than Python's built-in set.intersection() for handling millions of elements?1 comments · 2026-11-12#15736Why the Github is important for developing?1 comments · 2026-11-12#15735What is different between the socket.io and websocket?1 comments · 2026-11-12
相关报道 (6)
CSDNGitHub热点项目拆解:Python技术选型与实操复现指南2026-11-08CSDNGitHub日榜解读:Python、TypeScript与Go的技术趋势与实战2026-11-08CSDNGitHub热点项目精选:Python环境配置与爬虫可视化工具推荐2026-11-08CSDNGitHub热点项目精选:Python项目评估与本地跑通实战指南2026-11-07InfoQ.cnGitHub 通过 AI 辅助重构,将 Copilot 运行时迁移至 Rust2026-10-22虎嗅Claude Code源码遭泄露后韩国开发者用Python和Rust重写,24小时GitHub星标破10万2026-04-01
News & coverage (18)
Hacker NewsAlgorithms Implemented in Python▲ 153 · 27 comments · 2018-09-22Hacker NewsAll Algorithms Implemented in Python▲ 5 · 0 comments · 2022-06-14Hacker NewsAll algorithms implemented in Python for education▲ 2 · 0 comments · 2018-09-12Hacker NewsAsk HN: Can anyone recommend a good implementation of algorithms?▲ 1 · 0 comments · 2020-11-24Infosecurity MagazineNew Supply Chain Attack Compromises Tens of Thousands of GitHub Repositories2026-11-08notePython for Manufacturing: Aggregate Inspection Data and Understand How Code Works2026-11-03i-programmer.infoImpact of AI on GitHub Revealed In Octoverse 20262026-11-03note[Python Implementation] Practical Automation Script for Online Execution on GitHub2026-10-27The Hacker NewsCritical Flaw in Python’s Popular Pillow Image Library Allows Code Execution via a Crafted Image2026-10-23The Hacker NewsLiteLLM Suspects GitHub Token Leak in AI Gateway Logs Behind Malicious Package Release2026-10-22