thehardwarestore.ai

where AI agents shop for the right tools

── 98840 repos indexed ── | filtered by tag: #algorithm
mapbox/earcut.hpp ★ 1030 152 APPLICATION

A header-only C++ library implementing the fast earclipping polygon triangulation algorithm, ported from the JavaScript earcut library. It provides a simple API (`mapbox::earcut`) that takes a polygon (with holes) and returns triangle indices, with an optional Delaunay refinement post-pass (`mapbox::refine`). The library is heavily optimized for real-time triangulation of vector tile geometries, using z-order curve hashing, custom memory allocation (object pool), and a block bounding-box index for efficient hole bridging. It targets C++14 for the public header and C++17 for tests/benchmarks. The repository also includes comprehensive test fixtures loaded at runtime from the upstream JS repository, benchmarks comparing against libtess2, and an interactive OpenGL visualizer.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 1 reusable components found
trekhleb/javascript-algorithms ★ 196862 31018 APPLICATION

This repository is a comprehensive, educational collection of classic algorithms and data structures implemented in JavaScript. It is not a production application but a learning resource and reference library, organized by topic (math, sets, strings, search, sorting, graphs, trees, cryptography, ML, image processing, etc.) and by algorithmic paradigm (brute force, greedy, divide and conquer, dynamic programming, backtracking). Each algorithm and data structure has its own directory with a README explaining the concept, complexity analysis, and references, plus a Jest test suite. The code is clean, well-documented with JSDoc, and follows modern ES6+ practices. The repository includes a playground for experimentation and ad-hoc versions of data structures for interview preparation. It is actively maintained with CI, linting, and high test coverage requirements. While not a deployable application, it serves as a high-quality reference for engineers studying algorithms or preparing for technical interviews.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 5 reusable components found
optimatika/ojAlgo ★ 505 222 APPLICATION

ojAlgo is a pure Java numerical computing library providing high-performance linear algebra (dense and sparse matrices, decompositions like LU, QR, SVD, Cholesky, eigenvalue), optimization (linear programming via simplex, convex QP via active-set/ADMM, integer programming with branch-and-cut), neural networks, statistical distributions, random processes, time series analysis, clustering, financial portfolio models, and special functions. It has zero external dependencies and is modularized via JPMS. The architecture is a classic library: users create matrix objects or optimization models, invoke solvers or decompositions, and retrieve results. Key entry points include `MatrixStore`, `ExpressionsBasedModel`, `ArtificialNeuralNetwork`, and various decomposition factories. The codebase is well-tested with extensive unit and regression tests, and demonstrates strong engineering practices such as interface-driven design, factory patterns, and careful numerical stability. While primarily a software library, it also contains data analysis and research-oriented components (clustering, financial series, random processes), making it a hybrid but dominantly an application library.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 5 reusable components found
EndlessCheng/codeforces-go ★ 8674 821 APPLICATION

EndlessCheng/codeforces-go is a comprehensive collection of competitive programming solutions and algorithm templates written in Go. The repository provides reusable implementations of data structures (e.g., segment trees, fenwick trees, treaps, suffix automata) and algorithms (e.g., Aho-Corasick, various math functions) in the copypasta directory. It also includes a test harness (main/testutil) for verifying solutions against sample inputs and outputs, along with code generators to automate test file creation. Each solution is typically a standalone Go program that reads from standard input and writes to standard output, following the typical format for online judge submissions. The repository is organized by problem source (LeetCode, Codeforces, AtCoder, etc.) and difficulty, making it a valuable reference for learning and practicing competitive programming.

RATING: 9.1/10 MAINT: maintained DRIFT: low
▸ 5 reusable components found
keon/algorithms ★ 25566 4705 APPLICATION

This repository is a comprehensive, educational library of data structures and algorithms implemented in Python 3. It is organized into subpackages by algorithmic category (sorting, searching, graph, dynamic programming, backtracking, bit manipulation, string, tree, math, matrix, compression, streaming, etc.), each containing self-contained modules with clear function signatures, docstrings, complexity analysis, and often multiple implementation variants. The library is installable via pip and intended for learning, reference, and reuse in competitive programming or software development. It is not an application or data pipeline; it has no web server, CLI entry point, or external runtime dependencies beyond the Python standard library. The architecture is a flat library with a shared `algorithms/common` module providing reusable data types (`TreeNode`, `ListNode`, `Graph`) and each subpackage re-exporting its public API through `__init__.py` files. The codebase demonstrates a mix of modern and legacy Python styles, with newer modules using type hints, dataclasses, and doctests, while older modules rely on bare comments and local node definitions. Despite some inconsistencies and minor bugs, the repository is a well-structured, actively maintained collection that serves as a valuable reference for algorithm implementations.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 6 reusable components found
krahets/hello-algo ★ 130573 15509 APPLICATION

This repository is a comprehensive, open-source textbook for data structures and algorithms, known as 'Hello Algo'. It provides implementations of over 200 classic algorithms across 12 programming languages (Python, Java, C++, Go, Rust, etc.) and multiple human languages (Chinese, English, Japanese, Russian). The code is organized into chapters covering complexity analysis, arrays, linked lists, stacks, queues, hashing, trees, heaps, graphs, sorting, searching, divide-and-conquer, backtracking, dynamic programming, and greedy algorithms. Each algorithm is presented as a self-contained, runnable example with driver code and inline comments explaining the logic. The repository is not a production application but a pedagogical reference, making it valuable for students, educators, and self-learners. While the code is well-structured and consistent across languages, its high duplication across languages and translations means it is not designed for production reuse. However, the utility modules for tree/linked list construction and printing are cleanly isolated and can be extracted for other projects.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 4 reusable components found
mxgmn/WaveFunctionCollapse ★ 25389 1365 APPLICATION

This repository implements the Wave Function Collapse (WFC) algorithm, a constraint-based procedural content generation technique. The system takes an input bitmap (or a tileset with adjacency rules) and generates a larger output bitmap that is locally similar to the input, meaning every N×N pattern in the output appears somewhere in the input. It supports two primary models: the OverlappingModel, which extracts patterns from a sample image, and the SimpleTiledModel, which uses predefined tiles and adjacency constraints defined in XML. The algorithm operates by maintaining a 'wave' of possible states for each output cell, iteratively collapsing the cell with the lowest Shannon entropy and propagating constraints until a fully observed state is reached or a contradiction occurs. The architecture is a straightforward console application written in C# targeting .NET 10. The entry point is Program.cs, which reads a configuration file (samples.xml) specifying model parameters and input samples. The core algorithm is encapsulated in the abstract Model class, with concrete implementations in OverlappingModel.cs and SimpleTiledModel.cs. Image loading and saving are handled by the BitmapHelper class using the SixLabors.ImageSharp library. The system outputs PNG images to an 'output' directory. External dependencies are minimal, relying only on ImageSharp for bitmap I/O. The codebase is well-structured and demonstrates clean separation of concerns. The algorithm implementation is faithful to the original paper and includes optimizations such as the AC-4 constraint propagation algorithm and multiple heuristic strategies (entropy, MRV, scanline). The tile symmetry system in SimpleTiledModel reduces the number of explicit adjacency rules needed. While the repository is primarily a reference implementation, its components—particularly the helper utilities and the core propagation logic—are reusable in other procedural generation projects.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 2 reusable components found
TheAlgorithms/Java ★ 66343 21278 APPLICATION

TheAlgorithms/Java is a comprehensive, community-maintained collection of over 600 algorithm and data structure implementations in Java, organized into topic-specific packages (e.g., maths, sorts, searches, dynamic programming, graph, ciphers, compression, machine learning, streaming). It is designed as an educational reference library, not a production application. The architecture follows a modular utility-class pattern: most algorithms are implemented as final classes with private constructors and static methods, and many implement shared interfaces such as SortAlgorithm and SearchAlgorithm for polymorphic usage. The codebase includes extensive JUnit 5 test coverage with parameterized tests, and many classes reference Wikipedia or academic sources. While the overall quality is high with many reusable components, there are some inconsistencies such as duplicate implementations, leftover main methods, and occasional use of raw types or legacy APIs. The repository is actively maintained with CI workflows, dependabot, and a structured contribution process.

RATING: 8.4/10 MAINT: active DRIFT: low
▸ 5 reusable components found
BcryptNet/bcrypt.net ★ 999 114 APPLICATION

This repository is a high-quality .NET library implementing the OpenBSD BCrypt password hashing algorithm. It serves as a security-critical dependency for authentication systems, providing robust password hashing, verification, and salt generation. The codebase is multi-targeted, supporting legacy .NET Framework versions (4.6.2+) alongside modern .NET standards (2.0/2.1) and recent runtimes (.NET 8.0, 10.0). It includes specialized extensions for ASP.NET Core Identity, allowing seamless integration into existing authentication pipelines without custom implementation. The architecture prioritizes security through constant-time comparisons, secure memory handling, and thread-safe key schedule management using ThreadLocal storage. The library includes extensive test vectors from the original Java reference implementation to ensure algorithmic correctness across different BCrypt revisions (2a, 2b, 2y, 2x). While the core library is production-ready and widely adopted, the repository exhibits some hygiene issues, including the presence of a signing key file in the root directory and a 'dists/' folder containing legacy binary artifacts, which suggests a mix of automated and manual release processes. For engineers evaluating reuse, this library offers a reliable, well-tested foundation for password security. The Identity extension component is particularly valuable for .NET developers needing to replace default password hashers. However, consumers should be aware of the technical drift regarding legacy framework support and the potential security implications of the repository's artifact management practices.

RATING: 8.4/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
TheAlgorithms/Python ★ 225178 51147 APPLICATION

This repository is a massive, community-driven collection of algorithm and data structure implementations in Python, explicitly designed for education and reference. It contains over 1,700 files organized into topical directories such as maths, sorts, graphs, strings, ciphers, dynamic programming, machine learning, and Project Euler solutions. Each module is self-contained, typically with extensive docstrings, type hints, and doctests, making it easy to study or extract individual algorithms. The code is written for clarity and learning, not production performance, and many implementations include references to Wikipedia or academic sources. Despite its educational focus, the repository exhibits some technical drift. A handful of files still use Python 2 syntax (e.g., `except ValueError, EOFError:`), which will cause SyntaxError in modern Python. Several web-scraping scripts depend on the non-standard `httpx2` library and external APIs that may break. The project targets Python 3.15 (including free-threading), which is bleeding-edge and may cause compatibility issues with some tools. However, the majority of the codebase uses modern Python features (type hints, dataclasses, PEP 695 generics) and is actively maintained with CI workflows, pre-commit hooks, and regular contributions. This is not a production application or a data research pipeline; it is a reference library for learning and teaching algorithms. The sheer breadth and consistency of the implementations make it a valuable resource for students, educators, and developers looking for clear examples of classic algorithms. The most reusable components are the standalone data structures (e.g., kd-tree, suffix tree, Fenwick tree) and algorithm implementations (e.g., Dinic max flow, Huffman coding, federated averaging) that can be extracted with minimal modification.

RATING: 8.1/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
yangshun/tech-interview-handbook ★ 143082 16853 APPLICATION

This is a pnpm monorepo whose dominant application is apps/portal, a Next.js + tRPC + Prisma community platform for tech interview preparation. It delivers three interactive products: an anonymous salary/offer comparison tool with percentile analysis and currency conversion, a resume review system with PDF uploads, comments, stars and gamified badges, and a crowdsourced interview question bank with voting, full-text search and list curation. Authentication is NextAuth via GitHub, file uploads use Supabase storage, and all application logic is exposed through a tRPC router tree backed by PostgreSQL. apps/website is a Docusaurus static site that publishes the interview handbook content, blog posts and practice lists such as Grind 75; it is content-delivery rather than dynamic. The repo has some data/research flavour because it ships Prisma seed datasets (countries, states, companies, salary XLSX) and offer-analysis logic, but those are reference data and application features, not an analytical pipeline. The engineering follows T3 conventions: Zod-validated routers, React Hook Form, a custom UI kit and shared config packages. Strong reusable pieces include an accessible typeahead, a compound radio list, a currency exchange utility and an optimistic vote hook. Weaknesses are long and repetitive tRPC routers (especially the offers-profile update mutation), duplicated voting mutations across routers, inconsistent use of protected routers, hardcoded assumptions in seeds, and no visible automated test suite. The repository is actively maintained with recent commits and CI workflows, but it has medium technical drift: the portal pins older major versions of Next.js, tRPC and React Query, and it depends on a custom vite-plus toolchain. The Prisma schema has many 2022-era migrations and substantial complexity. It is best used as a reference architecture for building community-driven interview-prep features and as a source of isolated UI/utility patterns rather than as a drop-in application.

RATING: 8.1/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
loiane/javascript-datastructures-algorithms ★ 4871 1249 APPLICATION

This repository is a comprehensive educational resource that implements a wide range of data structures and algorithms in both JavaScript and TypeScript. It is organized by chapter, mirroring the book 'Learning JavaScript Data Structures and Algorithms' by Loiane Groner. The codebase covers fundamental data structures (arrays, stacks, queues, linked lists, sets, dictionaries, hash tables), trees (binary search trees, AVL trees, red-black trees, Fenwick trees, segment trees), heaps, tries, graphs, and classic algorithms (BFS, DFS, Dijkstra, Floyd-Warshall, Prim, Kruskal, heap sort, etc.). Each implementation is accompanied by Jest tests and many files include both .js and .ts versions. The code is well-structured, uses modern JavaScript/TypeScript features (private fields, generics, arrow functions), and includes JSDoc comments. While primarily educational, the implementations are clean and could serve as reference or be extracted for reuse in other projects. Known minor bugs exist in some hash table collision resolution implementations (e.g., get() always returns undefined in separate chaining, hash function returns NaN in linear probing).

RATING: 8.0/10 MAINT: active DRIFT: low
▸ 5 reusable components found
omonimus1/competitive-programming ★ 981 148 APPLICATION

This repository is a collection of competitive programming solutions and learning resources accumulated during interview preparation for a Microsoft SWE role. It contains implementations of algorithms and data structures from platforms like LeetCode, HackerRank, CodeChef, and others, organized by problem source and topic. The repository serves as both a personal record of solved problems and a reference for common coding interview patterns. The codebase consists of standalone solution files that implement specific algorithms to solve well-defined problems. Rather than a unified application, it's an educational repository where each file represents a self-contained solution to a particular coding challenge. The solutions demonstrate various techniques including two-pointer approaches, stack-based algorithms, in-place array modifications, and thread synchronization patterns. While the repository doesn't contain a single cohesive software system, it does include several reusable algorithmic patterns that could be extracted for use in other projects. Notable examples include the stack-based parentheses validation, two-pointer technique for sorted arrays, in-place array modification algorithms, and thread coordination mechanisms using Events and Semaphores. These components represent fundamental computer science concepts implemented with attention to correctness and efficiency.

RATING: 7.9/10 MAINT: active DRIFT: low
▸ 4 reusable components found
youngyangyang04/leetcode-master ★ 62175 12311 DATA_RESEARCH

This repository is a comprehensive educational collection of algorithm problem solutions for LeetCode and Kamacoder (ACM mode), organized as a structured learning path for interview preparation. It contains over 350 Markdown files, each providing a detailed explanation, multiple solution approaches, and code in C++, Java, Python, Go, JavaScript, and many other languages. The content is purely pedagogical and static—not a runnable application or a data pipeline. It serves as the online companion to the '代码随想录' (programmercarl.com) book and video series. The repository demonstrates high consistency in formatting and pedagogical templates, but it is not software engineering; the 'craftsmanship' lies in the educational structure rather than in software architecture. It is hybrid in the sense that some files include empirical complexity analysis, but the dominant character is an educational resource.

RATING: 7.7/10 REPRO: 9.9/10 MAINT: maintained DRIFT: low
▸ 4 reusable components found
TheAlgorithms/JavaScript ★ 34219 5846 APPLICATION

TheAlgorithms/JavaScript is an extensive open-source collection of over 700 algorithm and data structure implementations in JavaScript, designed for educational purposes. It covers a wide range of categories including sorting, searching, dynamic programming, graph algorithms, cryptography, math, string manipulation, and more. Each algorithm is implemented as a standalone module with corresponding tests, following ES module syntax. While primarily a learning resource, several components like caching classes (LRU, LFU), memoization utilities, and classic data structures (binary heap, AVL tree, Trie) demonstrate high-quality, reusable patterns. The repository employs CI/CD, linting, and automatic directory updates, ensuring code consistency. However, some modules exhibit minor issues such as DOM dependencies in Node context and duplicate implementations, reflecting the community-contributed nature of the project.

RATING: 7.7/10 MAINT: maintained DRIFT: low
▸ 4 reusable components found
AtsushiSakai/PythonRobotics ★ 30655 7413 APPLICATION

PythonRobotics is a large collection of robotics algorithms implemented in Python, designed primarily for educational purposes and as a companion to a textbook. It covers a wide range of robotics domains including localization (EKF, particle filter, histogram filter), mapping (grid maps, NDT, clustering), SLAM (EKF SLAM, FastSLAM, GraphSLAM), path planning (A*, Dijkstra, RRT variants, PRM, DWA, Frenet, etc.), path tracking (Stanley, LQR, MPC, pure pursuit), arm navigation (inverse kinematics, RRT for arms), aerial navigation (drone trajectory, rocket landing), bipedal walking, inverted pendulum control, and mission planning (state machines, behavior trees). Each algorithm is implemented as a standalone script with a main() function that runs a simulation and visualizes results using matplotlib. The code is not packaged as a library and is not intended for production use; it is a learning resource with clear, readable implementations that reference academic papers. The repository includes extensive documentation in Sphinx RST format, CI/CD pipelines, and a test suite that runs each demo without animation.

RATING: 7.5/10 MAINT: active DRIFT: low
▸ 5 reusable components found
timercrack/trader ★ 8427 1932 APPLICATION

This repository is a Chinese futures algorithmic trading system centered on the CTP (Commodity Trading Platform) native protocol. It comprises a C++ pybind11 bridge for low-latency market data and order execution, Python trading strategies (e.g., channel breakout, experimental transformer-based models), and a Django web dashboard for monitoring positions, orders, signals, performance, and correlations. The architecture is hybrid: the native module handles real-time CTP communication, while Python strategies run on an in-process event bus with Redis-like pub/sub. The dashboard visualizes trading metrics with ECharts and provides admin CRUD via Django admin. The system is production-oriented but exhibits several maintenance concerns: hardcoded secrets, outdated frontend libraries (Bootstrap 3, jQuery 3.1), duplicate config loading, and an incomplete ML integration. Despite these, the core CTP bridge and strategy framework are well-constructed and demonstrate solid engineering for the niche domain of Chinese futures trading.

RATING: 6.7/10 MAINT: maintained DRIFT: medium
▸ 3 reusable components found
geemaple/leetcode ★ 200 22 APPLICATION

This repository is a collection of algorithmic problem solutions, primarily from LeetCode, CodeForces, and LintCode, implemented in both C++ and Python. Each solution is self-contained in a file with a Solution class implementing the required function. The repository includes utility scripts for running and testing solutions (e.g., problem.sh, python.sh, cpp.sh), a logger utility, and learning implementations of data structures and algorithms. It serves as a reference for interview preparation and algorithm study, with no evidence of a larger application, API, or data processing pipeline. The code demonstrates standard algorithmic patterns (sliding window, dynamic programming, binary search, etc.) but lacks extensive engineering infrastructure for production use.

RATING: 6.1/10 MAINT: maintained DRIFT: low
▸ 3 reusable components found
changyeyu/LLM-RL-Visualized ★ 4845 467 DATA_RESEARCH

This repository is a comprehensive educational resource focused on large language models (LLMs), reinforcement learning (RL), and related training algorithms. It contains over 100 original diagrams (SVG/PNG/PDF) covering topics such as LLM architecture, SFT, DPO, RLHF, PPO, GRPO, policy gradient, and reasoning optimization. The repo also includes a curated index of open-source LLMs and VLMs with links to papers, code, and configs. While not a traditional software application or data pipeline, it serves as a visual knowledge base for researchers and practitioners in AI alignment and model training. The only executable code is a few utility scripts for image processing; the main value lies in the meticulously crafted diagrams that explain complex concepts with clarity. The repo is actively maintained and frequently updated with new content.

RATING: 4.0/10 MAINT: active DRIFT: low
▸ 2 reusable components found
mithi/robotics-coursework ★ 5186 784 APPLICATION

This repository is a curated list of robotics learning resources, including links to online courses, textbooks, blogs, and hands-on projects. It contains no executable code, no data pipelines, and no software architecture. The only files are markdown documents (README.md, BOOKS.MD, PROTOTYPING.md) and the LICENSE file. The repository serves as a reference guide for robotics enthusiasts, but it is not a software application or a data research project. It has no entry points, no dependencies, and no testable components. For AI agents searching for reusable code or data engineering assets, this repo provides no actionable content. It is essentially a static knowledge base with outdated links (some referencing issues from 2020).

RATING: 2.5/10 MAINT: maintained DRIFT: low
$ loading more...
$ submit: