TheAlgorithms/Python
65.9
Adequate · 18 September 2026
114.9k
lines of production code
Python
primary language
1
measurement over time
What this system is
This system is a comprehensive Python library providing implementations of fundamental algorithms and data structures across diverse domains including computer science, mathematics, physics, and engineering. It serves as an educational and reference resource by offering ready-to-use solutions for classic computational problems, such as sorting, searching, graph traversal, and dynamic programming, alongside specialized modules for image processing, machine learning, and financial calculations. The codebase also includes a substantial collection of solutions to Project Euler problems, demonstrating various algorithmic approaches to number theory and combinatorics.
How it got here
2016–2019 — comprehensive algorithm library expansion
44 changes.
The project underwent a massive expansion of its algorithmic library, adding extensive implementations across domains such as data structures, machine learning, cryptography, and image processing. This period also involved standardizing the development environment with modern Python tooling and enhancing code quality through rigorous testing and validation scripts.
2020 — expanding algorithmic modules and project euler solutions
36 changes.
This period focused on significantly expanding the repository's algorithmic coverage by adding new modules for graphics, geodesy, quantum computing, and electronics, alongside enhancements to existing areas like machine learning and digital image processing. A substantial portion of the work involved implementing diverse solutions for numerous Project Euler problems, demonstrating various algorithmic approaches to mathematical challenges. The period also included the addition of unit tests to ensure the correctness of graph, knapsack, and file transfer functionalities.
2021–2026 — comprehensive algorithmic expansion
27 changes.
This period focused on significantly expanding the library's coverage of mathematical, algorithmic, and data structure implementations, including new modules for geometry, physics, finance, and audio processing. The work also involved adding numerous solutions to Project Euler problems, enhancing machine learning components with new optimizers and activation functions, and modernizing the project's build configuration and development environment.
Features
Add Canny edge detection algorithm
The \digital\_image\_processing/edge\_detection\ module now includes a new Canny edge detection implementation in \canny.py\. This feature allows users to detect edges in images using a multi-stage process involving Gaussian smoothing, Sobel gradient calculation, non-maximum suppression, and hysteresis thresholding. The algorithm is exposed as a \canny\ function that accepts an image and optional threshold parameters.
_digital\_image\_processing/edge\detection · high confidence
Add Local Weighted Linear Regression algorithm
Introduces a new non-parametric machine learning algorithm, Local Weighted Linear Regression (LWL), to the library. This implementation uses a Gaussian weight function to prioritize data points closest to a prediction, allowing for flexible modeling of non-linear relationships. The module includes core functions for calculating weights and performing regression, along with utilities to load data from seaborn datasets and plot the resulting regression curves for demonstration purposes.
_machine\_learning/local\_weighted\learning · high confidence
Add Project Euler Problem 092 solution using digit dynamic programming
A new solution for Project Euler Problem 092 (Square digit chains) has been added in \project\_euler/problem\_092/sol1.py\. This implementation replaces previous iterative approaches with a digit dynamic programming algorithm, significantly improving performance by computing the count of numbers below ten million that arrive at 89 in approximately 40,000 operations rather than iterating through every number individually.
_project\_euler/problem\092 · high confidence
Add Project Euler Problem 13 with two solution implementations
The Project Euler Problem 13 module now includes the input data file (num.txt) containing one hundred 50-digit numbers, along with two distinct solution scripts. The first solution (sol1.py) calculates the sum of these numbers using Python's arbitrary-precision integers and returns the first ten digits. The second solution (sol2.py) implements a manual column-by-column addition algorithm to compute the first 'n' digits of the sum, offering an alternative approach to the same problem.
_project\_euler/problem\013 · high confidence
Add Project Euler Problem 54 poker hand solver
Introduces a new solution for Project Euler Problem 54, which determines the winner in a series of poker hands. The change adds a \PokerHand\ class in \sol1.py\ that parses card strings, identifies hand types (such as pairs, straights, flushes, and full houses), and compares hands according to standard poker rules. A corresponding test suite in \test\_poker\_hand.py\ validates the hand classification logic and comparison outcomes, supported by the \poker\_hands.txt\ data file containing the 1,000 hands to be evaluated.
_project\_euler/problem\054 · high confidence
Add Project Euler Problem 79 solution
Added a new solution for Project Euler Problem 79 (Passcode derivation) in \project\_euler/problem\_079/sol1.py\. The implementation analyzes a list of successful login attempts to determine the shortest possible secret passcode by finding the permutation of unique characters that satisfies the relative order constraints from all provided logins. The entry also includes the required data files: \keylog.txt\ containing the fifty login attempts for the main problem and \keylog\_test.txt\ for testing.
(repo-wide) · high confidence
Add Radix Tree and Trie data structures with delete support
This change introduces two new data structures to the library: a standard Trie (prefix tree) and a space-optimized Radix Tree. Both implementations now support insertion, lookup, and deletion of words. The Radix Tree specifically handles edge cases in insertion and merging nodes to optimize space, while the Trie includes a recursive delete method to remove words and clean up unused nodes.
_data\structures/trie · high confidence
Add Simplex algorithm implementation for linear programming
The linear\_programming module now includes a new simplex algorithm implementation (simplex.py) that solves linear programs in tabular form, supporting \>=, \<=, and = constraints with non-negative variables. The implementation features a Tableau class with validation for data types and constraint validity, pivot selection logic, and support for both standard and two-stage simplex methods.
_linear\programming · high confidence
Add backtracking algorithm implementations
The backtracking module now includes a comprehensive set of algorithm implementations, including all\_combinations, all\_permutations, all\_subsequences, coloring, combination\_sum, crossword\_puzzle\_solver, generate\_parentheses, generate\_parentheses\_iterative, hamiltonian\_cycle, knight\_tour, m\_coloring\_problem, match\_word\_pattern, minimax, n\_queens, n\_queens\_math, power\_sum, and rat\_in\_maze. These additions provide users with ready-to-use solutions for classic backtracking problems such as graph coloring, the N-Queens problem, and maze solving.
backtracking, knapsack · high confidence
Add basic string genetic algorithm implementation
Introduces a new \genetic\_algorithm\ module containing a \basic\_string.py\ implementation that evolves a target string using evaluation, selection, crossover, and mutation phases. The algorithm runs in a single thread by default, with a commented-out option for multi-threading, and includes validation to ensure the target string can be formed from the provided gene set.
_genetic\algorithm · high confidence
Add cellular automata simulations
The cellular\_automata module now includes implementations for Conway's Game of Life (with image generation), Rule 30 Elementary Cellular Automaton, Langton's Ant, the Nagel-Schrekenberg traffic model, and the Wa-Tor ecosystem simulation, along with a one-dimensional automaton generator.
_cellular\automata · high confidence
Add data compression algorithms and utilities
The data\_compression module now includes implementations for several compression techniques: Burrows-Wheeler transform (with reverse), coordinate compression for mapping values to ranks, Huffman coding for file compression, Lempel-Ziv-Welch (LZW) compression and decompression, LZ77 sliding-window compression, move-to-front transform (encode/decode), run-length encoding (encode/decode), and peak signal-to-noise ratio (PSNR) calculation for image quality assessment.
_data\compression · high confidence
Add disjoint set data structure implementation
The disjoint set (union-find) data structure is now available in the data structures library. This addition includes two implementations: a list-based version using union-by-rank and path compression heuristics, and a node-based version that supports set operations and includes a test suite to verify correctness.
_data\_structures/disjoint\set · high confidence
Add file transfer examples using Python sockets
Added a new file\_transfer module containing send\_file.py and receive\_file.py, which demonstrate basic file transfer functionality over TCP sockets on localhost (port 12312). The send script acts as a server that listens for connections and transmits a specified file, while the receive script acts as a client that connects to the server and saves the incoming data to a local file. A sample text file (mytext.txt) with mixed character encodings is included for testing purposes.
_file\transfer · high confidence
Add forecasting module with multiple prediction methods and data safety checking
The machine\_learning/forecasting module now includes a run.py script that implements three forecasting algorithms—linear regression, SARIMAX, and Support Vector Regression—along with an interquartile range outlier checker and a data safety voting system. Users can now run this module against the provided ex\_data.csv to generate predictions and verify data integrity, with the script outputting whether the current day's data is considered safe based on the consensus of the prediction models.
_machine\learning/forecasting · high confidence
Add hashes module with multiple algorithm implementations
The \hashes\ directory now contains a collection of hashing and checksum algorithms, including Adler-32, DJB2, ELFHash, Fletcher-16, Luhn, MD5, SHA-1, SHA-256, SDBM, and a Hamming code error-correcting implementation. Additionally, a 'chaos machine' PRNG and an Enigma machine simulation are included. A README provides documentation on common algorithms like MD5 and SHA, noting that MD5 is vulnerable and SHA-1 is deprecated. Users can now import these specific algorithms from the \hashes\ package for data integrity checking, validation, or educational purposes.
hashes · high confidence
Add image rotation capability
Introduces a new \get\_rotation\ function in the \digital\_image\_processing/rotation\ module that applies affine transformations to images using OpenCV. This allows users to rotate image data based on specified source and destination point sets, with a built-in example demonstrating rotation on a grayscale Lena image.
_digital\_image\processing/rotation · high confidence
Add neural network algorithms and data utilities
The neural\_network module now includes implementations for several machine learning models: a Back Propagation Neural Network (BPNN) with configurable layers and loss plotting, a Convolutional Neural Network (CNN) for image recognition with model save/load capabilities, a Generative Adversarial Network (GAN) example for MNIST data, a Perceptron for binary classification with reproducible training, a simple single-layer neural network for forward propagation, and a two-hidden-layer neural network with backpropagation. Additionally, a utility module for downloading and reading MNIST data is provided.
_neural\network · high confidence
Add new greedy algorithm implementations
The greedy\_methods module now includes several new algorithm implementations: best\_time\_to\_buy\_and\_sell\_stock for calculating maximum stock profit, fractional\_cover\_problem and two variants of fractional\_knapsack for optimization problems, gas\_station for finding a valid starting point in a circular route, minimum\_coin\_change for currency exchange, minimum\_waiting\_time for scheduling queries, optimal\_merge\_pattern for file merging costs, and smallest\_range for finding the minimal range across multiple sorted lists.
_greedy\methods · high confidence
Add new heap data structure implementations
The data\_structures/heap module now includes several new heap implementations: BinomialHeap, a generic Heap class supporting min/max via key functions, a standard MaxHeap, a MinHeap with decrease-key support, a RandomizedHeap, and a SkewHeap. These additions expand the available priority queue options for users needing different performance characteristics or specific operations like decrease-key or merging.
_data\structures/heap · high confidence
Add new physics algorithms and calculations
The physics module has been expanded with numerous new calculation scripts, including implementations for Boyle's Law, Archimedes' Principle, the Casimir Effect, Faraday-Lenz Law, the First Law of Thermodynamics, Fresnel Diffraction, Graham's Law, and orbital capture mechanics, among others.
physics · high confidence
Add single-indeterminate polynomial operations
The maths/polynomials module now includes a Polynomial class that supports basic arithmetic (addition, subtraction, multiplication), evaluation, differentiation, and integration for polynomials with a single indeterminate. Users can create polynomials by specifying degree and coefficients, perform standard algebraic operations, and compute derivatives or integrals with an optional constant of integration.
maths/polynomials · high confidence
Add solution for Project Euler Problem 124 (Ordered Radicals)
Added a new solution module for Project Euler Problem 124, which calculates the k-th number in the sorted sequence of integers based on their ordered radicals. The implementation uses a sieve to generate primes up to a maximum limit, constructs all possible radicals from these primes, and then determines the specific integer requested by the user.
_project\_euler/problem\124 · high confidence
Add solution for Project Euler Problem 30 (Digit Fifth Powers)
A new solution for Project Euler Problem 30 has been added to the project. This implementation calculates the sum of all numbers that can be written as the sum of fifth powers of their digits by iterating through the range 1000 to 999,999 and checking the condition using a precomputed dictionary of digit fifth powers.
_project\_euler/problem\030 · high confidence
Add solution for Project Euler Problem 345 (Matrix Sum)
Added a new solution for Project Euler Problem 345, which calculates the 'Matrix Sum'—the maximum possible sum of matrix elements such that no two selected elements share the same row or column. The implementation in \sol1.py\ uses a brute-force approach with caching to optimize intermediate calculations, supporting both small example matrices and the large 15x15 matrix specified in the problem.
_project\_euler/problem\345 · high confidence
Add solution for Project Euler Problem 37 (Truncatable Primes)
A new solution file (sol1.py) has been added to the Project Euler problem 037 directory, implementing the algorithm to find the sum of the eleven primes that are both truncatable from left to right and right to left. The implementation includes helper functions for prime checking and number truncation, along with unit tests for the internal logic.
_project\_euler/problem\037 · high confidence
Add solution for Project Euler Problem 49 (Prime Permutations)
Added a new solution for Project Euler Problem 49, which identifies the 12-digit number formed by concatenating the only other 4-digit increasing arithmetic sequence of three primes that are permutations of each other (excluding the known sequence starting with 1487). The implementation generates 4-digit primes, checks for permutations within the prime list using binary search, and brute-forces candidate sequences to find the valid arithmetic progression.
_project\_euler/problem\049 · high confidence
Add solution for Project Euler Problem 68 (Magic 5-gon ring)
A new solution file (sol1.py) has been added to the Project Euler problem 68 directory, implementing an algorithm to find the maximum 16-digit string for a 'magic' 5-gon ring. The code uses permutations of numbers 1-10 to generate valid ring configurations and returns the largest concatenated numeric string, with support for 3-gon and 4-gon rings as well.
_project\_euler/problem\068 · high confidence
Add solution for Project Euler Problem 95 (Amicable Chains)
Added a new solution for Project Euler Problem 95, which finds the smallest member of the longest amicable chain with no element exceeding one million. The implementation in \project\_euler/problem\_095/sol1.py\ uses a prime factorization approach to efficiently calculate the sum of proper divisors for numbers up to the limit, then iterates through the resulting chains to identify the longest cycle.
_project\_euler/problem\095 · high confidence
Add solutions for Project Euler Problem 74
Added two new solution implementations (sol1.py and sol2.py) for Project Euler Problem 74, which calculates how many numbers below one million produce a chain of exactly sixty non-repeating terms when iteratively summing the factorials of their digits. The first solution uses recursive chain length calculation with caching, while the second uses an iterative approach with explicit type validation and caching of chain set lengths to optimize performance.
_project\_euler/problem\_072, project\_euler/problem\074 · high confidence
Add solutions for Project Euler problems 8 and 80
New solution files have been added for Project Euler Problem 8 (Largest product in a series) and Problem 80 (Square root digital expansion). Problem 8 includes three distinct implementations (\sol1.py\, \sol2.py\, \sol3.py\) offering iterative, functional (\functools.reduce\), and optimized sliding-window approaches to find the greatest product of thirteen adjacent digits in a 1000-digit number. Problem 80 provides a solution using the \decimal\ module to calculate the sum of the first one hundred decimal digits of irrational square roots.
_project\_euler/problem\_008, project\_euler/problem\_025, project\_euler/problem\_031, project\_euler/problem\040 · high confidence
Add triangular fuzzy set class and Zadeh vector operators
The fuzzy\_logic module now provides two complementary ways to perform fuzzy set operations. The new \fuzzy\_operations.py\ file introduces a \FuzzySet\ class that models triangular fuzzy numbers using their (left, peak, right) parameters, supporting union, intersection, complement, and membership calculations. Additionally, \fuzzy\_set\_operations.py\ implements Zadeh's fuzzy-set operators (union, intersection, complement, difference, algebraic sum/product, bounded sum/difference) that work directly on sampled membership vectors, allowing these operations to be applied to any membership shape (triangular, trapezoidal, Gaussian, etc.) using only NumPy.
_fuzzy\logic · high confidence
Added Burke's dithering algorithm
Users can now convert grayscale images to black and white using Burke's error-diffusion dithering algorithm. This new capability is implemented in the \digital\_image\_processing/dithering\ module, introducing a \Burkes\ class that accepts an input image and a threshold, automatically converting RGB inputs to grayscale and applying the specific error propagation weights defined by the algorithm.
_digital\_image\processing/dithering · high confidence
Added KD-Tree and Suffix Tree data structures
This change introduces two new data structures to the library. The KD-Tree implementation (in data\_structures/kd\_tree) provides functionality to build a tree from a list of points and perform nearest neighbor searches, including an example usage script. The Suffix Tree implementation (in data\_structures/suffix\_tree) allows users to build a tree from a text string and search for patterns within it, also accompanied by example usage and tests.
_data\_structures/kd\tree · high confidence
Added LSTM stock prediction example
The \machine\_learning/lstm\ directory now contains a runnable example for predicting stock prices using a Long Short-Term Memory (LSTM) network. This includes the \lstm\_prediction.py\ script, which builds a Keras model to forecast future values based on historical data, along with a \sample\data.csv\ file for immediate testing and an \\\init\\_.py\ file to make the directory a proper Python package.
_machine\learning/lstm · high confidence
Added Nearest Neighbour image resizing algorithm
The digital\_image\_processing/resize module now includes a Nearest Neighbour interpolation algorithm, implemented in the new resize.py file. This addition provides the simplest and fastest method for resizing images by mapping each destination pixel to its nearest source pixel, accessible via the NearestNeighbour class which handles dimension validation and coordinate mapping.
_digital\_image\processing/resize · high confidence
Added Project Euler Problem 11 solution and data
Added the solution files (sol1.py, sol2.py) and the 20x20 grid data file (grid.txt) for Project Euler Problem 11, which calculates the greatest product of four adjacent numbers in the grid.
_project\_euler/problem\011 · high confidence
Added Project Euler Problem 5 solutions
Added two new solution files for Project Euler Problem 5 (Smallest Multiple) in the problem\_005 directory. The first solution (sol1.py) implements a brute-force search to find the smallest positive number evenly divisible by all numbers from 1 to n, including input validation for type and range. The second solution (sol2.py) provides a more efficient approach using the Least Common Multiple (LCM) algorithm, leveraging a shared greatest\_common\_divisor utility function to compute the result iteratively.
_project\_euler/problem\_004, project\_euler/problem\005 · high confidence
Added Project Euler solution guidelines and package initialization
The project\euler directory now includes a README.md file that provides solution guidelines, coding style rules, and a template for contributors, along with an \\init\\_.py file to make the directory a proper Python package.
_project\euler · high confidence
Added \_\_init\_\_.py to data\_structures package
An empty \_\init\\_.py file has been added to the data\_structures directory, converting it into a proper Python package and allowing its contents to be imported as a module.
_data\structures · high confidence
Added histogram stretch algorithm implementation
The histogram\_equalization module now includes a new \ConstantStretch\ class in \histogram\_stretch.py\ that performs histogram stretching on input images. Users can apply this transformation to enhance image contrast by mapping pixel values to a new range, with the processed image saved to \output\_data/output.jpg\. The module also provides methods to plot the resulting histogram and display the input and output images side-by-side.
_digital\_image\_processing/histogram\equalization · high confidence
Added morphological dilation and erosion operations
Users can now apply morphological dilation and erosion operations to images. This change introduces new \dilation\_operation.py\ and \erosion\_operation.py\ modules within the \digital\_image\_processing/morphological\_operations\ package, providing functions to dilate or erode binary images using a specified kernel, along with helper utilities to convert RGB images to grayscale and then to binary format.
_digital\_image\_processing/morphological\operations · high confidence
Added multiple solution implementations for Project Euler Problem 1
The project\_euler/problem\_001 directory now includes seven distinct Python solution files (sol1.py through sol7.py) that calculate the sum of all multiples of 3 or 5 below a given number. These implementations offer users various algorithmic approaches, including a straightforward generator expression, an arithmetic progression formula, a pattern-based iteration, a set-based collection method, and several loop variations, allowing for comparison of different coding styles and performance characteristics for this specific problem.
_project\_euler/problem\_001, project\_euler/problem\_009, project\_euler/problem\020 · high confidence
Added prime number utilities
A new module for prime number operations has been introduced, providing an efficient O(sqrt(n)) function to check if a number is prime and a utility to find the next prime number relative to a given value.
_data\_structures/hashing/number\theory · high confidence
Added solution for Project Euler Problem 19 (Counting Sundays)
A new solution file (sol1.py) has been added to the Project Euler problem 19 directory. This implementation calculates the number of Sundays that fell on the first of the month during the twentieth century (1901–2000), returning the result 171. The code includes the problem description as a docstring and provides a standalone execution entry point.
_project\_euler/problem\019 · high confidence
Added solution for Project Euler Problem 41 (Pandigital Prime)
A new solution file (sol1.py) has been added to the Project Euler Problem 41 directory, implementing a function to find the largest n-digit pandigital prime. The implementation uses permutations to generate pandigital numbers and an O(sqrt(n)) primality test to identify primes, specifically optimizing for 7-digit numbers based on divisibility rules.
_project\_euler/problem\041 · high confidence
Added solution for Project Euler problem 109
A new solution file (sol1.py) has been added to the Project Euler problem 109 directory. This implementation calculates the number of distinct ways a player can checkout with a score less than a given limit (default 100) in a darts game, adhering to the 'doubles out' rule. The code constructs lists of possible dart values (singles, doubles, triples, and misses) and iterates through combinations to count valid checkouts.
(repo-wide) · high confidence
Added solution for Project Euler problem 119 (Digit power sum)
A new solution for Project Euler problem 119 has been added to the project. This implementation calculates the nth term of the sequence of numbers equal to the sum of their digits raised to a power, specifically solving for the 30th term as requested by the problem statement.
_project\_euler/problem\119 · high confidence
Added solution implementations for Project Euler problems 17, 71, and 76
New solution files have been added for three Project Euler problems: Problem 17 (counting letter counts for numbers 1 to 1000), Problem 71 (finding the numerator of the fraction immediately to the left of 3/7 in the sorted reduced proper fractions for denominators up to 1,000,000), and Problem 76 (counting the number of ways to write 100 as a sum of at least two positive integers). Each problem now includes a dedicated module with a \solution\ function and doctests.
_project\_euler/problem\_016, project\_euler/problem\_048, project\_euler/problem\_069, project\_euler/problem\_017, project\_euler/problem\_071, project\_euler/problem\076 · high confidence
Added solutions for Project Euler problems 2 and 24
New solution files have been added for Project Euler Problem 2 (Even Fibonacci Numbers) and Problem 24 (Lexicographic Permutations). Problem 2 includes five distinct implementation strategies (sol1 through sol5), ranging from iterative accumulation to a closed-form mathematical approach using the golden ratio, all computing the sum of even-valued Fibonacci terms not exceeding a given limit. Problem 24 provides a solution using Python's itertools to find the millionth lexicographic permutation of the digits 0-9.
(repo-wide) · high confidence
Added three solution implementations for Project Euler Problem 10
The project\_euler/problem\_010 directory now contains three distinct approaches to solving the 'Summation of primes' problem. sol1.py provides a basic O(sqrt(n)) primality test solution, sol2.py introduces a generator-based approach using the same primality check, and sol3.py implements the Sieve of Eratosthenes for more efficient prime generation up to the specified limit.
_project\_euler/problem\010 · high confidence
Added two solution implementations for Project Euler Problem 12
The project\_euler/problem\_012 directory now includes two distinct Python solutions (sol1.py and sol2.py) for finding the first triangle number with over five hundred divisors. Solution 1 uses a simple iterative loop to generate triangle numbers and count divisors, while Solution 2 employs a generator-based approach for triangle number generation. Both implementations return the expected result of 76576500.
_project\_euler/problem\_012, project\_euler/problem\015 · high confidence
Added two solutions for Project Euler Problem 14 (Collatz sequence)
This change introduces two new Python implementations for Project Euler Problem 14, which seeks the starting number under one million that produces the longest Collatz sequence. The first solution (sol1.py) uses an iterative approach with a dictionary to cache sequence lengths for performance optimization. The second solution (sol2.py) employs a recursive approach with a global cache dictionary to store previously computed sequence lengths. Both solutions include doctests verifying correct outputs for various input ranges.
_project\_euler/problem\014 · high confidence
Expand bit manipulation library with new algorithms and utilities
The bit\_manipulation module has been significantly expanded with a wide range of new algorithms and helper functions. New capabilities include Gray code sequence generation, Fast Walsh-Hadamard Transform (FWHT) for bitwise XOR, AND, and OR convolutions, and binary-coded decimal (BCD) and Excess-3 code conversions. Additional utilities cover bit shifting (logical and arithmetic), two's complement representation, bit rotation, and various bit-counting methods (including Brian Kernighan's algorithm and lookup tables). The module also adds functions for finding unique numbers, missing numbers, powers of two, and checking parity or evenness using bitwise operations.
_bit\manipulation · high confidence
Expanded search algorithm library with new implementations and refactored tree traversal
The searches module has been significantly expanded with new algorithm implementations including exponential, fibonacci, jump, interpolation, median of medians, quick select, double linear (iterative and recursive), sentinel linear, and simple binary search. Additionally, hill climbing, simulated annealing, and tabu search algorithms have been added for optimization problems. The binary tree traversal logic has been moved from a traversals directory into this module as binary\_tree\_traversal.py, providing pre-order, in-order, post-order, and level-order traversal methods. These changes provide a broader set of search and optimization tools for users.
searches · high confidence
Initial implementation of the ciphers module with classical and encoding algorithms
The \ciphers\ directory has been added to the project, introducing a comprehensive suite of cryptographic algorithms and encoding utilities. This includes classical ciphers such as Caesar, Affine, Atbash, Autokey, Baconian, Beaufort, Bifid, and Vigenère variants, as well as encoding schemes like Base16, Base32, Base64, and Base85. The module also provides tools for cryptanalysis, including a chi-squared test for breaking Caesar ciphers, and implements key exchange protocols like Diffie-Hellman. All implementations include type hints, docstrings, and doctests to ensure correctness and usability.
ciphers · high confidence
Introduce audio\_filters package with IIR, Butterworth, and Equal-Loudness filters
The new \audio\_filters\ directory provides a suite of audio processing tools. It includes a generic N-order Infinite Impulse Response (IIR) filter engine, a collection of second-order Butterworth (biquad) filter designs (lowpass, highpass, bandpass, notch, peak, shelving, and allpass), and an Equal-Loudness filter that compensates for the human ear's non-linear response using a Yule-Walker filter and a Butterworth high-pass filter. The package also includes utilities to plot magnitude and phase responses, along with the Robinson-Dadson equal-loudness contour data.
_audio\filters · high confidence
Introduce educational blockchain algorithms and implementations
Added new educational modules to the blockchain package, including a simple blockchain with Proof-of-Work mining and chain verification, a standalone Proof-of-Work solver, a Proof-of-Stake validator selector, and a Merkle Tree construction and verification module. Also added mathematical utilities for solving Diophantine equations and an introductory README explaining blockchain concepts.
blockchain · high confidence
Introduce maths package with foundational algorithms and geometry functions
The maths directory is now a proper Python package, initialized with \_\init\\_.py, and populated with a comprehensive set of new modules. Users now have access to implementations for absolute value operations (abs\_min, abs\_max), arithmetic without standard operators (addition\_without\_arithmetic), and number theory utilities such as aliquot sums, prime factorization, Euler's totient function, and binary exponentiation (both iterative and recursive, including modular variants). Geometric calculations are expanded with area functions for cubes, cuboids, spheres, cones, and conical frustums, alongside arc length and area-under-curve approximations. Statistical and signal processing tools are also included, featuring autocorrelation, average absolute deviation, mean/median/mode calculations, and bearing computations between geographic points. Additional algorithms cover binomial coefficients and distributions, base-neg2 conversion, Chinese Remainder Theorem, Cholesky decomposition, and the Chudnovsky algorithm for high-precision PI calculation.
maths · high confidence
Introduce networking\_flow module with four maximum-flow algorithms
The new \networking\_flow\ directory provides four self-contained, type-hinted Python implementations for the maximum-flow problem, each verified with doctests. Users can choose the algorithm best suited to their graph structure: \ford\_fulkerson.py\ (Edmonds-Karp via BFS, adjacency matrix, O(V\*E^2)) for learning and small graphs; \minimum\_cut.py\ to find the minimum s-t cut edges using the Ford-Fulkerson residual graph; \dinic.py\ (Dinic's algorithm, adjacency list, O(V^2\*E)) for sparse graphs or those with parallel edges; and \push\_relabel.py\ (Goldberg-Tarjan, highest-label selection, O(V^2\*sqrt(E))) for dense graphs. All modules are runnable directly to execute their embedded tests.
_networking\flow · high confidence
New CPU scheduling simulation engine and algorithm implementations
The scheduling module now includes a new \SchedulerEngine\ class in \cpuschedulingalgorithms.py\ that provides a unified interface for simulating CPU scheduling algorithms (FCFS, SJF, Priority, Round Robin) with a Tkinter-based Gantt chart visualization. Additionally, standalone implementations for specific algorithms have been added or updated, including First Come First Served, Highest Response Ratio Next, Job Sequencing with Deadlines, Multi-Level Feedback Queue, Non-Preemptive Shortest Job First, Round Robin, and Shortest Job First, each providing functions to calculate waiting and turnaround times.
scheduling · high confidence
New VS Code Devcontainer with Python 3.13, Ruff, and Zsh
Developers can now open the repository in VS Code using the Remote-Containers extension to get a consistent, pre-configured development environment. The container is based on Python 3.13 on Debian Bookworm and automatically installs pre-commit hooks, the Ruff linter/formatter, and the \uv\ package manager. It also configures the terminal to use Zsh with the Oh My Zsh framework, including the \zsh-autosuggestions\ and \zsh-syntax-highlighting\ plugins, and sets up VS Code to use Ruff for formatting and code actions on save.
.devcontainer · high confidence
New activation functions added to the neural network module
The neural\_network/activation\_functions module has been expanded with several new activation functions, including Binary Step, Exponential Linear Unit (ELU), Gaussian Error Linear Unit (GELU), Leaky ReLU, Mish, Scaled Exponential Linear Unit (SELU), Soboleva Modified Hyperbolic Tangent, Softplus, Squareplus, and Swish (including SiLU). These additions provide users with a wider variety of activation options for neural network models, supporting different use cases such as addressing vanishing gradients (Leaky ReLU), self-normalizing behavior (SELU), and smooth approximations of ReLU (Softplus, Mish).
_neural\_network/activation\functions · high confidence
New algorithms and utilities added to the 'other' module
The 'other' directory now includes a collection of new algorithm implementations and utility scripts. These additions cover resource allocation and deadlock avoidance (Banker's Algorithm), exact cover problems (Dancing Links), propositional logic satisfiability (DPLL), convex hull computation (Graham Scan), and various caching strategies (LRU, LFU). Additional utilities include progress indicators, date calculations (Doomsday, Gauss Easter), shuffling, greedy optimization, and h-index computation. An \_\init\\_.py file has also been added to the directory to properly structure the module.
other · high confidence
New array algorithms and data structures added
The \data\_structures/arrays\ module has been expanded with a suite of new algorithms and data structures. Users can now find equilibrium indices, count pairs with a given sum, check for monotonicity, and compute prefix sums via a reusable class. Additional capabilities include finding the k-th largest element, calculating the median of two sorted arrays, rotating arrays, and solving Sudoku puzzles. The module also introduces utilities for indexing 2D arrays as 1D, finding triplets with a zero sum, and computing product sums for nested structures, alongside a sparse table implementation for efficient range minimum queries.
_data\structures/arrays · high confidence
New binary tree algorithms and data structures added
The data\_structures/binary\_tree directory now includes a comprehensive set of new implementations and utilities. This adds support for various tree traversals (pre-order, in-order, post-order, level-order, zigzag, and reverse in-order), structural operations (mirror, flatten to linked list, diameter, depth, fullness check), and specific algorithms such as maximum path sum, node sum, path sum counting, and coin distribution. It also introduces new data structures including AVL trees, Red-Black trees, Fenwick trees, and multiple Binary Search Tree variants (iterative and recursive). Additionally, visual perspective algorithms like left, right, top, and bottom side views are now available, along with documentation in a new README.md.
_data\_structures/binary\tree · high confidence
New boolean algebra logic gates and utilities
The boolean\_algebra module now includes implementations for several logic gates and utilities: AND (including N-input), OR, NOT, NAND, NOR, XOR, XNOR, IMPLY, and NIMPLY, along with a 2-to-1 multiplexer and Karnaugh map simplification. These additions expand the available boolean operations for users.
_boolean\algebra · high confidence
New computer vision algorithms and tools added
The computer\_vision module has been expanded with a suite of new implementations: a Convolutional Neural Network (CNN) for image classification, a Vision Transformer (ViT) for image classification, and image style reconstruction using Gram matrices. Additionally, new algorithms for optical flow (Horn-Schunck), texture analysis (Haralick descriptors), and intensity-based segmentation have been added. The module also now includes image augmentation techniques (flip and mosaic), various thresholding methods (Otsu, mean), pooling functions (max and average), and a Harris corner detector.
_computer\vision · high confidence
New conversion algorithms and modules added to the conversions package
The conversions module has been significantly expanded with new capabilities for data, numerical, and physical unit conversions. Users can now convert between various number bases (binary, octal, hexadecimal, decimal) and specialized codes (Gray, Excess-3), as well as convert integers to English words using short, long, or Indian numbering systems. Additional features include IPv4 address conversion, endianness swapping for 16/32/64-bit integers, and Excel column title conversion. Physical unit conversions have also been added for astronomical and standard length scales, energy, and molecular chemistry (mass, moles, pressure, volume, temperature).
conversions · high confidence
New divide-and-conquer algorithms for geometry, sorting, and optimization
The divide\_and\_conquer module now includes several new algorithms: closest\_pair\_of\_points for finding the minimum distance between points in a 2D plane, convex\_hull for computing the convex hull of a set of points (with both brute-force and divide-and-conquer approaches), heaps\_algorithm and heaps\_algorithm\_iterative for generating all permutations of a list, inversions for counting array inversions, kth\_order\_statistic for finding the k-th smallest element in linear time, max\_difference\_pair for finding the maximum difference between two elements in an array, max\_subarray for finding the contiguous subarray with the maximum sum, mergesort for sorting arrays, peak for finding the peak in a unimodal list, power for calculating exponentiation, and strassen\_matrix\multiplication for multiplying matrices using Strassen's algorithm. An \\init\\_.py file has also been added to the module.
_divide\_and\conquer · high confidence
New dynamic programming algorithms and modules added
The dynamic\_programming package now includes a wide range of new algorithmic implementations, expanding the library's coverage of classic dynamic programming problems. New additions include string manipulation tools (abbreviation, all\_construct, edit distance, longest common subsequence/substring, wildcard matching), combinatorial and number theory solvers (catalan numbers, integer partition, largest divisible subset, combination sum IV, egg dropping, knapsack with subset reconstruction), and sequence/alignment algorithms (fibonacci variants, climbing stairs, longest increasing subsequence in multiple complexities, bitmasking, floyd-warshall shortest paths, and k-means clustering via TensorFlow). These files provide ready-to-use, documented solutions for these specific computational problems.
_dynamic\programming · high confidence
New electronics algorithms for circuit analysis and component calculations
The electronics module now includes a comprehensive suite of new calculation tools for electrical engineering. Users can now compute apparent, real, and reactive power; apply Ohm's Law, Coulomb's Law, and electrical impedance formulas; and calculate inductive reactance and resonant frequency. The module also supports circuit analysis for half-wave and full-wave rectifiers, Wheatstone bridges, and 555 timer circuits (astable mode). Additionally, new functions handle capacitor and resistor equivalence (series/parallel), charging/discharging behaviors for capacitors and inductors, carrier concentration, electric conductivity, and resistor color code decoding.
electronics · high confidence
New financial algorithms for interest, depreciation, and risk analysis
The financial module now includes several new calculation tools: interest computations (simple, compound, and APR) in interest.py; loan amortization via equated monthly installments; asset depreciation using the straight-line method; and investment risk metrics including the Kelly Criterion, Sharpe Ratio, and their variants. Additionally, time-series analysis is supported with Simple and Exponential Moving Average implementations, while present value of cash flows, GST/tax-inclusive pricing, and time-and-a-half pay calculations are also available.
financial · high confidence
New fractal generators added to the fractals directory
The fractals directory now includes several new self-contained fractal generators. Users can generate the Barnsley fern (an iterated function system), the Hilbert curve (a space-filling curve), Julia sets (including quadratic and exponential variants), the Koch snowflake, the Mandelbrot set (with color-coded or black-and-white output), the Sierpinski carpet (text-based), the Sierpinski triangle (turtle graphics), and the Vicsek fractal (turtle graphics). The collection is organized into visual demos that open windows or produce images, and pure-computation generators that support doctests for CI verification.
fractals · high confidence
New geodesy module with distance and coordinate conversion algorithms
A new \geodesy\ package has been introduced, providing three core capabilities for geographic calculations. First, it offers distance computation via \haversine\_distance\ (spherical approximation) and \lamberts\_ellipsoidal\_distance\ (ellipsoidal model with latitude/longitude validation). Second, it includes coordinate conversion utilities in \radar\_target\_calculation\ for transforming between Geodetic, ECEF, and ENU coordinate systems. Finally, it provides a \calculate\_target\_coordinates\ function that derives target geodetic positions from radar measurements (azimuth, range, elevation) relative to a radar's known position.
geodesy · high confidence
New geometry module with shape classes and algorithms
A new \geometry\ package has been added, providing foundational 2D shape classes (Angle, Side, Ellipse, Circle, Point, Triangle) and a suite of computational geometry algorithms. Users can now calculate polygon areas using the shoelace formula, simplify polylines with the Ramer-Douglas-Peucker algorithm, and determine convex hulls via Graham Scan, Andrew's Monotone Chain, or Jarvis March. Additional capabilities include computing the diameter of convex polygons using Rotating Calipers, checking for line segment intersections, and finding triangle centers (circumcenter, incenter, orthocenter).
geometry · high confidence
New graph algorithms and bidirectional search implementations
The graphs module now includes several new algorithm implementations: A\* search for grid-based pathfinding, Ant Colony Optimization for the Traveling Salesman Problem, and Bidirectional Search variants (A\*, BFS, and general graph search) that explore from both start and goal simultaneously to reduce search space. Additionally, new files provide Borůvka's Minimum Spanning Tree algorithm, articulation point detection, and improved bidirectional Dijkstra with numpy-based cost tracking.
graphs · high confidence
New graphics algorithms and utilities
The graphics module now includes several new capabilities: a BezierCurve class that generates curves from control points and supports plotting and derivative calculation; a butterfly\_pattern function that generates ASCII art patterns; a Digital Differential Analyzer (DDA) line drawing algorithm for calculating line coordinates; and vector3\_for\_2d\_rendering utilities for projecting 3D points to 2D and rotating points around axes.
graphics · high confidence
New hashing data structures and implementations added
The \data\structures/hashing\ module now includes several new data structures and collision-resolution strategies. A \Bloom\ filter is available for space-efficient set membership testing with configurable false-positive rates. The core \HashTable\ base class is supplemented by specific implementations: \HashMap\ (a modern open-addressing map with automatic resizing), \DoubleHash\ (using a second hash function for probing), \QuadraticProbing\ (using quadratic offsets for collision resolution), and \HashTableWithLinkedList\ (using linked lists at each bucket for chaining). An \\\init\\_.py\ file exposes these components for import.
_data\structures/hashing · high confidence
New image processing algorithms and test suite
This update introduces several new digital image processing capabilities: brightness and contrast adjustment functions using PIL, a sepia tone effect and negative conversion using OpenCV, and an IndexCalculation class for computing various vegetation indices (such as NDVI and EVI) from spectral data. It also includes a new test suite covering these new features alongside existing algorithms like Canny edge detection, Gaussian filtering, and Burkes dithering.
_digital\_image\processing · high confidence
New image processing filters added to the library
The filters module now includes implementations for bilateral, convolution, Gabor, Gaussian, Laplacian, local binary pattern, median, and Sobel filters. Users can apply these algorithms to images for tasks such as edge detection, noise reduction, and texture analysis.
_digital\_image\processing/filters · high confidence
New linear algebra algorithms and deterministic matrix inversion
The linear\_algebra module now includes several new algorithms for solving systems of linear equations and decomposing matrices: Gauss-Jordan elimination, Gaussian elimination with retroactive resolution, the Jacobi iteration method, and LU decomposition. Additionally, a new matrix inversion function has been added that leverages NumPy. To ensure test reliability across different platforms and BLAS backends, the matrix inversion doctests have been updated to round results to six decimal places, making the expected output deterministic.
_linear\algebra · high confidence
New linked list implementations and algorithms added
The data\_structures/linked\_list module has been expanded with several new data structures and algorithms. This includes a basic singly linked list with position-based insertion, a circular linked list with tail optimization, a doubly linked list, a deque implemented via a doubly linked base, and a generic doubly linked list using dataclasses. Additionally, new algorithmic modules have been introduced: Floyd's cycle detection, loop detection via iteration, palindrome checking (using three different approaches), finding the kth element from the end, merge sort for linked lists, merging two sorted lists, finding the middle element, and partitioning a linked list around a value.
_data\_structures/linked\list · high confidence
New machine learning algorithms and utilities added
The machine\learning module now includes several new algorithms and utilities: Apriori and FP-Growth for association rule mining, A\ for pathfinding, Automatic Differentiation for gradient computation, DBSCAN for density-based clustering, a Decision Tree for regression, Principal Component Analysis and Linear Discriminant Analysis for dimensionality reduction, Federated Averaging for model aggregation, and a Gaussian Mixture Model for clustering. Additionally, data transformation utilities for normalization and standardization have been added, and the module is now importable as a package via a new \_\init\\_.py file.
_linear\_algebra/src, machine\learning · high confidence
New matrix algorithms and OOP matrix class
The matrix module now includes a comprehensive set of new algorithms and a new object-oriented Matrix class. New additions include binary search on sorted matrices, counting islands (including diagonal connections), counting negative numbers in sorted matrices, counting distinct paths via DFS, Cramer's rule for 2x2 systems, matrix inversion for 2x2 and 3x3 matrices, Kronecker product, largest square area in a binary matrix, a matrix-based game, matrix equalization, and recursive matrix multiplication. The new Matrix class provides an OOP interface for matrix operations, including determinant, inverse, minors, cofactors, and arithmetic operations.
matrix · high confidence
New neural network optimizers added
The \neural\_network/optimizers\ module now includes implementations for Adagrad, Adam, Momentum SGD, Muon, and Nesterov Accelerated Gradient (NAG) optimizers. These additions expand the available training algorithms for neural networks, allowing users to choose from adaptive learning rate methods (Adagrad, Adam), momentum-based approaches (Momentum SGD, NAG), and specialized orthogonalization techniques (Muon).
_neural\network/optimizers · high confidence
New numerical analysis algorithms and module structure
The maths/numerical\analysis package has been reorganized with a new \\init\\_.py and expanded to include several new algorithms: Adams-Bashforth methods (orders 2-5) for solving ordinary differential equations, Brent's Method for robust root finding, the Gauss-Seidel method for solving linear systems, the Weierstrass (Durand-Kerner) method for finding all complex polynomial roots, and the Runge-Kutta-Gills method (order 4) for ODEs. Existing capabilities have also been added or consolidated, including proper fractions generation, multiple bisection implementations, Newton-Raphson root finding, Neville's interpolation, Newton forward interpolation, Simpson's rule integration, and square root approximation via Newton's method.
_maths/numerical\analysis · high confidence
New quantum algorithms and documentation added to the quantum module
The quantum module now includes implementations of the Shor's factorization algorithm and the Quantum Fourier Transform (QFT), along with a new README providing setup instructions for IBM Qiskit and Google Cirq. Several other quantum algorithm scripts (such as BB84, Deutsch-Jozsa, and various adders) have been added but are disabled by renaming them to .DISABLED.txt, effectively removing them from active use while preserving the code for reference.
quantum · high confidence
New queue implementations added to data\_structures/queues
The repository has added a new \data\_structures/queues\ package containing multiple queue implementations: \CircularQueue\ (array-based), \CircularQueueLinkedList\ (linked-list-based), \Deque\ (double-ended queue), \LinkedQueue\ (linked-list-based), \FixedPriorityQueue\ and \ElementPriorityQueue\ (priority queues), \QueueByList\ (list-based), \QueueByTwoStacks\ (stack-based), and \Queue\ (pseudo-stack-based). These modules provide various queue data structures with standard operations like enqueue/dequeue, append/popleft, and priority handling, along with doctests for verification.
_data\structures/queues · high confidence
New scripts for Hacktoberfest PR management and solution validation
The scripts directory now includes a suite of tools to manage the influx of pull requests during Hacktoberfest and validate code quality. A new \hacktoberfest\_prep\_update.py\ script automates the tracking of open pull requests, using concurrent HTTP requests to efficiently update a status file with statistics and resolved PR states. To help maintainers clear the backlog, several shell scripts (\close\_pull\_requests\with\\*.sh\) have been added to automatically close PRs that lack required tests, type hints, or descriptive names, or that have failing tests or merge conflicts. Additionally, \pr\_file\_map.py\ helps identify potential merge conflicts by mapping files touched by open PRs, while \validate\_solutions.py\ and \validate\_filenames.py\ enforce coding standards by checking Project Euler solution hashes and filename conventions.
scripts · high confidence
New series detection and generation algorithms added to maths/series
The maths/series module now includes new capabilities for identifying and generating various mathematical series. Users can detect whether a list of numbers forms an arithmetic, geometric, harmonic, or alternating harmonic series using the new \is\_arithmetic\_series\, \is\_geometric\_series\, \is\_harmonic\_series\, and \is\_alternate\_harmonic\_series\ functions. Additionally, new modules provide generation for geometric, harmonic, P-series, logarithmic, and hexagonal number sequences, along with functions to calculate arithmetic, geometric, and harmonic means.
maths/series · high confidence
New sorting algorithms and benchmarking tool added to the sorts directory
The \sorts\ directory now includes a comprehensive collection of sorting algorithm implementations, such as adaptive merge sort, bead sort, binary insertion sort, bitonic sort, bogo sort, bubble sort (iterative and recursive), bucket sort, circle sort, cocktail shaker sort, comb sort, counting sort, cycle sort, cyclic sort, double sort, Dutch national flag sort, exchange sort, external sort, and flash sort. Many of these algorithms are now generic over comparable items using Python's \Protocol\ for type safety. Additionally, a new \benchmark\_sorts.py\ script has been added to allow users to compare the performance of these algorithms on random datasets.
sorts · high confidence
New special number algorithms added to maths/special\_numbers
The maths/special\_numbers module has been populated with implementations for a wide range of special number types, including abundant, deficient, Armstrong, automorphic, Bell, Carmichael, Catalan, Disarium, happy, Harshad, hexagonal, Kaprekar (both the constant 6174 routine and the number property), Krishnamurthy, perfect, polygonal, pronic, Proth, spy, triangular, trimorphic, ugly, and weird numbers. Each type is provided in its own file with public functions for checking or calculating the respective number properties, along with input validation and doctest examples.
_maths/special\numbers · high confidence
New stack-based algorithms and data structures added
The data\_structures/stacks module has been expanded with several new capabilities: a generic Stack class with overflow/underflow handling, stack implementations using linked lists and queues, and algorithms for balanced parentheses, Dijkstra's two-stack expression evaluation, infix-to-postfix/prefix conversion (with operator precedence and associativity), postfix/prefix evaluation (including unary operators), next greatest element, kth next greater element, largest rectangle in a histogram, lexicographical number ordering, and stock span calculation.
_data\structures/stacks · high confidence
New string algorithms and validators added
The strings directory now includes a comprehensive suite of new algorithms and validation tools. New capabilities include string matching and search (Aho-Corasick, Bitap, Boyer-Moore, Boyer-Moore-Horspool, Z-function, Booth's Algorithm, Suffix Automaton, Manacher's, Damerau-Levenshtein, Edit Distance, Hamming Distance, Jaro-Winkler, Knuth-Morris-Pratt, Rabin-Karp, and Wildcard Pattern Matching), text processing and transformation (Autocomplete using Trie, Byte-Pair Encoding Tokenizer, CamelCase/SnakeCase conversion, Title Case, Pig Latin, Text Justification, and alternative string arrangement), and various validators (Barcode, Credit Card, Email, Phone Number, and Polish PESEL). Additionally, new utility functions cover anagram detection, palindrome rearrangement checks, vowel/consonant counting, DNA strand complementing, and English language detection.
strings · high confidence
Project Euler Problem 7: 10001st prime solution added
Added three distinct solution implementations for Project Euler Problem 7 (finding the 10001st prime number) in the \project\_euler/problem\_007\ directory. Solution 1 uses a simple iterative check with an O(sqrt(n)) primality test. Solution 2 employs a list-based approach with input validation for the \nth\ parameter. Solution 3 utilizes a generator and \itertools.islice\ for a more functional approach to retrieving the nth prime.
_project\_euler/problem\007 · high confidence
Behavioural changes
Added empty \_\_init\_\_.py to image\_data package
An empty \_\init\\_.py file was added to the digital\_image\_processing/image\_data directory, explicitly marking it as a Python package to ensure proper module resolution and importability within the project structure.
_digital\_image\_processing/image\data · high confidence
Added empty \_\_init\_\_.py to maths/images directory
An empty \_\init\\_.py file was added to the maths/images directory, making it a proper Python package. This change enables the directory to be imported as a module, which is a prerequisite for adding mathematical image processing functions in the future.
maths/images · high confidence
Repository initialized with free-threaded Python 3.14 and uv-based tooling
The repository has been bootstrapped with a new development environment targeting free-threaded Python 3.14 (specified in \.python-version\ and \uv.lock\). Dependency management and locking are now handled by \uv\ (with \uv.lock\ and \uv-pre-commit\ hooks), replacing previous systems. The pre-commit configuration has been standardized to use \ruff\ for linting and formatting, alongside \codespell\, \auto-walrus\, and \pyproject-fmt\. New documentation files \AGENTS.md\ and \SECURITY.md\ have been added to guide contributors and AI agents, and \CONTRIBUTING.md\ has been updated to reflect the new Python version and tooling requirements.
(repo-wide) · high confidence
Test coverage
Added comprehensive test suite for comparison-based sorting algorithms; Added test coverage for file transfer functionality; Added test suite for matrix operations; Added tests for HashMap implementation; Added unit tests for graph algorithms; Added unit tests for knapsack algorithms.
Dependencies
Migrate to pyproject.toml and update core dependencies
The project has consolidated its build configuration into pyproject.toml, replacing the previous requirements.txt. This update raises the minimum supported Python version to 3.14 and upgrades key scientific libraries, including scikit-learn to \>=1.9.1 and scipy to \>=1.18.1. Additionally, the HTTP client dependency has been switched from httpx to httpx2, and optional groups have been introduced for computer vision (opencv-python) and quantum computing (qiskit) to support free-threaded Python environments.
(dependencies) · high confidence
Migrate web programming scripts to httpx2 and Python 3.13
The web\_programming module has been updated to use the httpx2 library (pydantic's maintained fork of httpx) for all HTTP requests, replacing the previous requests dependency. Additionally, the scripts now require Python 3.13 or higher, as indicated by the updated shebangs and dependency manifests.
_web\programming · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 66.
Lenses
- Code Health 92
- Architecture 100
- Maturity 58
- Readiness 59
- Security 81
Changes since last survey
- 300 commits — 240 feature/other, 60 fixes
By area
- (root) — 59 commits
- data_structures/linked_list — 22 commits
- docs/hacktober_2026_prep.md — 12 commits
- .github/workflows — 6 commits
- (repo) — 5 commits
- machine_learning/loss_functions.py — 5 commits
- scripts/pr_file_map.py — 5 commits
- data_structures/binary_tree — 3 commits
- sorts/adaptive_merge_sort.py — 3 commits
- .github/skills — 2 commits
- bit_manipulation/binary_and_operator.py — 2 commits
- ciphers/cryptomath_module.py — 2 commits
- electronics/wheatstone_bridge.py — 2 commits
- machine_learning/linear_regression.py — 2 commits
- maths/series — 2 commits
- maths/softmax.py — 2 commits
- matrix/count_islands_in_matrix.py — 2 commits
- searches/binary_tree_traversal.py — 2 commits
- sorts/bubble_sort_recursive.py — 2 commits
- sorts/bucket_sort.py — 2 commits
Notable commits
- fix: Add regression visualization (#14637)
- fix: Add review-open-issue skill documenting bug-issue triage practices (#15270)
- fix: Add vectorized implementations of Linear Regression using Gradient Descent (#13221)
- fix: Add: Ordinary Least Squares Regression Algorithm (#10800)
- fix: Fix
- fix: Fix
- fix: Fix
- fix: Fix
- fix: Fix
- fix: Fix
- fix: Fix
- fix: Fix
- fix: Fix
- fix: Fix Boyer-Moore bug bad character shift logic (#14848)
- fix: Fix binary search to return leftmost occurrence for duplicates (#13891)
- fix: Fix cnn prediction (#14904)
- fix: Fix doctest q fourier transform.py #9943 (#10624)
- fix: Fix doctests
- fix: Fix exponential search for empty collections (#15362)
- fix: Fix incorrect handling of zero input in binary_count_trailing_zeros (#14495)
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
TheAlgorithms/Python was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit f56e3496937e1559f75c3c16fb9483407b934442 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.