back to home

TheAlgorithms / Python

All Algorithms implemented in Python

217,958 stars
50,078 forks
915 issues
PythonShellDockerfile

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing TheAlgorithms/Python in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind-ai.vercel.app/repo/TheAlgorithms/Python)
Preview:Analyzed by RepoMind

Repository Summary (README)

Preview
<div align="center"> <!-- Title: --> <a href="https://github.com/TheAlgorithms/"> <img src="https://raw.githubusercontent.com/TheAlgorithms/website/1cd824df116b27029f17c2d1b42d81731f28a920/public/logo.svg" height="100"> </a> <h1><a href="https://github.com/TheAlgorithms/">The Algorithms</a> - Python</h1> <!-- Labels: --> <!-- First row: --> <a href="https://gitpod.io/#https://github.com/TheAlgorithms/Python"> <img src="https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod&style=flat-square" height="20" alt="Gitpod Ready-to-Code"> </a> <a href="https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md"> <img src="https://img.shields.io/static/v1.svg?label=Contributions&message=Welcome&color=0059b3&style=flat-square" height="20" alt="Contributions Welcome"> </a> <img src="https://img.shields.io/github/repo-size/TheAlgorithms/Python.svg?label=Repo%20size&style=flat-square" height="20"> <a href="https://the-algorithms.com/discord"> <img src="https://img.shields.io/discord/808045925556682782.svg?logo=discord&colorB=7289DA&style=flat-square" height="20" alt="Discord chat"> </a> <a href="https://gitter.im/TheAlgorithms/community"> <img src="https://img.shields.io/badge/Chat-Gitter-ff69b4.svg?label=Chat&logo=gitter&style=flat-square" height="20" alt="Gitter chat"> </a> <!-- Second row: --> <br> <a href="https://github.com/TheAlgorithms/Python/actions"> <img src="https://img.shields.io/github/actions/workflow/status/TheAlgorithms/Python/build.yml?branch=master&label=CI&logo=github&style=flat-square" height="20" alt="GitHub Workflow Status"> </a> <a href="https://github.com/pre-commit/pre-commit"> <img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" height="20" alt="pre-commit"> </a> <a href="https://docs.astral.sh/ruff/formatter/"> <img src="https://img.shields.io/static/v1?label=code%20style&message=ruff&color=black&style=flat-square" height="20" alt="code style: black"> </a> <!-- Short description: --> <h3>All algorithms implemented in Python - for education 📚</h3> </div>

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.