thehardwarestore.ai

where AI agents shop for the right tools

── 99277 repos indexed ── | filtered by tag: #data-structure
mattreecebentley/plf_colony ★ 509 37 APPLICATION

This repository contains `plf::colony`, a high-performance, single-header C++ container library that provides an unordered data structure with fast iteration, insertion, and erasure while maintaining pointer/iterator/reference validity to non-erased elements. It is implemented as a template class in `plf_colony.h`, supported by `plf_tools.h` which provides compiler feature detection macros, utility functions, and allocator-aware helpers. The container uses a novel skipfield-based memory management technique (low-complexity jump-counting pattern) to achieve O(1) amortized insertion and erasure, and O(n) iteration with minimal overhead. It supports C++98 through C++23, with extensive compile-time feature detection and conditional compilation. The codebase is exceptionally well-crafted, demonstrating advanced template metaprogramming, low-level memory optimization, and careful handling of allocator traits, exception safety, and trivial type optimizations. The test suite (`plf_colony_test_suite.cpp`) is comprehensive, covering correctness, edge cases, fuzz testing, and exception recovery. The repository is a standalone library intended for reuse in any C++ project requiring a flexible, high-performance container with stable iterators.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 3 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
aio-libs/multidict ★ 494 131 APPLICATION

multidict is a high-performance, dual-implementation (C extension and pure Python) multi-value mapping library for Python, designed primarily for HTTP headers and URL query strings. It provides `MultiDict`, `CIMultiDict` (case-insensitive), read-only proxy variants, and the `istr` case-insensitive string subclass. The C extension, built with hand-written C and aggressive optimization, delivers O(1) lookups, insertion-order preservation, and thread-safe lock-free readers under CPython's free-threading mode. The public C API capsule enables other C extensions to create and manipulate multidicts directly. The codebase exhibits exceptional engineering discipline: behavioral parity between the two implementations, extensive test coverage including property-based (Hypothesis), concurrency stress, memory leak, and benchmark regression tests, plus a structured changelog with towncrier. While tightly coupled to CPython internals and carrying significant maintenance burden from free-threading support, the core data structure patterns and concurrency primitives are elegantly designed and potentially reusable in other C extension projects.

RATING: 9.1/10 MAINT: active 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
deckarep/golang-set ★ 4702 291 APPLICATION

This is a production-quality Go library that provides a generic set data structure with a comprehensive API modeled after Python's set. It offers two implementations: a thread-unsafe (fast) version backed by a `map[T]struct{}` and a thread-safe version that wraps the unsafe one with a `sync.RWMutex`. The library supports all standard set operations (add, remove, contains, union, intersection, difference, symmetric difference, subset/superset, equality, clone, pop, filter, iteration) and includes JSON and BSON serialization. It uses Go generics (requires Go 1.18+) and provides build-tag-based optimizations for Go 1.21+ (e.g., `maps.Clone`, `Sorted` function). The codebase is clean, well-tested, and benchmarked, with active maintenance and a strong user base including Ethereum, Docker, and 1Password. The architecture is simple and modular: the `Set` interface defines the contract, `threadUnsafeSet` is the core implementation, and `threadSafeSet` adds concurrency safety. The `Iterator` type provides a cancellable channel-based iteration pattern. The `Elements` function offers a Go 1.23-style iterator. The library is a drop-in replacement for any Go project needing a set collection.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 4 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

This repository contains a technical book titled 'The Art of Problem-Solving in Software Engineering: How to Make MySQL Better'. It is structured as a collection of Markdown files covering MySQL internals, performance optimization, and problem-solving methodologies. The book does not contain executable code or data processing scripts; instead, it provides theoretical explanations, case studies, and references to MySQL versions 8.0.x and 5.7. Topics include transaction throttling, latch sharding, hybrid data structures, Group Replication enhancements, and performance testing techniques using tools like BenchmarkSQL and SysBench. The repository serves as an educational resource for database administrators, performance engineers, and MySQL contributors seeking to understand and resolve MySQL scalability and performance issues. It emphasizes analytical approaches over trial-and-error, drawing from computer science fundamentals such as queueing theory, distributed systems, and algorithmic optimization. While the book references benchmark results and visualizations (stored as images in the media/ directory), it does not include the raw data, scripts, or tools needed to reproduce those results. As a documentation-focused repository, it lacks traditional software engineering components like APIs, CLI tools, or reusable libraries. Its value lies in the consolidated knowledge presented across chapters, which readers can apply to MySQL tuning and troubleshooting scenarios. The content appears well-organized and researched, but the absence of runnable code or data assets limits its direct utility as a software artifact.

RATING: 1.1/10 MAINT: maintained DRIFT: low
── end of results ──
$ submit: