This repository is an educational library providing implementations of fundamental data structures and algorithms in JavaScript and TypeScript. It covers arrays, stacks, queues, linked lists, sets, dictionaries/hash tables, trees (BST, AVL, Red-Black, Fenwick, Segment), heaps, tries, and graphs, along with associated algorithms (sorting, searching, graph traversals, shortest paths, minimum spanning trees). The code is well-structured, generic, and thoroughly tested with Jest. Each data structure and algorithm is presented as an independent module, making it easy to study or reuse. The TypeScript versions include type annotations and complexity documentation. While primarily a learning resource, the implementations are production-quality and can be extracted for use in other projects.
FRDIntent is an iOS library designed to decouple view controller navigation through two primary mechanisms: an Intent-like system for internal app navigation (inspired by Android's Intent) and a URL router for handling deep links and app-to-app communication. The library separates these two concerns to avoid the limitations of tightly coupled navigation code, allowing developers to register view controllers against intent actions or URL patterns and launch them without direct dependencies. The architecture employs a protocol-oriented design where view controllers conform to protocols like `FRDIntentReceivable` to declare their ability to handle incoming intents. Core components include a singleton `FRDControllerManager` for managing internal navigation and a `FRDURLRoutes` singleton for processing incoming URLs. The URL routing system utilizes a Trie data structure (implemented in `Trie.swift`) for efficient pattern matching, supporting dynamic placeholders in URL paths (e.g., `/post/:postId`). Additionally, the library provides mechanisms for passing data between view controllers and handling results via callbacks, mirroring Android's `startActivityForResult` pattern. While the library demonstrates solid engineering practices—such as the reusable Trie implementation and clear separation of internal/external navigation concerns—it relies on singletons that may complicate testing and dependency injection. Recent updates (as indicated by the last commit in 2026) show the adoption of modern Swift concurrency features (`@MainActor`, `Task`), though some documentation and configuration files (like the README and podspec) exhibit inconsistencies regarding supported iOS and Swift versions. The inclusion of a demo app and unit tests aids in understanding and verifying the library's functionality.
openacid/slim is a Go library for building memory-efficient, serializable trie indexes and sparse arrays, primarily designed for in-memory indexing of large on-disk key-value data. The core artifact is SlimTrie, a compressed trie that achieves roughly 11 bits per key while supporting fast Get, range queries, prefix scans, and versioned marshal/unmarshal. The repository also contains a standalone sparse-array package and a type-safe encoder framework, with extensive benchmarks comparing against Go maps and btree indexes. Its architecture is modular: the trie package defines the index structure, the array package provides bitmap-backed dense/sparse storage primitives, and the encode package abstracts value serialization with generated concrete implementations.
hotpdf is a Python library for fast and memory-efficient PDF text extraction and search. It wraps pdfminer.six to load PDF pages into memory using a sparse matrix representation, a trie for text search, and a span map for grouping characters. The library provides a HotPdf class with methods to find text (with options for case sensitivity and span extraction), extract text from bounding boxes, extract spans, and merge multiple PDF documents. The architecture separates concerns into processing (processor.py), memory mapping (memory_map.py), data structures (data/classes.py), and utilities (utils.py).
trie-search is a JavaScript/TypeScript library implementing a Trie (prefix tree) data structure for efficient string-based object lookup. It enables mapping string keys to objects and retrieving all objects whose keys match a given prefix. The library supports features like case-insensitive search, customizable tokenization via regex, international character handling, caching of search results, and flexible result combination through a reducer pattern. Designed for use in autocomplete/typeahead interfaces, it indexes objects by breaking keys into character trees and returns all objects in subtrees matching the search prefix. The architecture centers around a TrieSearch class with methods for adding, removing, and searching items, using nested objects for internal node representation and hasharray/md5 dependencies for caching and ID generation.
lsq is a CLI tool written in Go that serves as a lightning-fast companion for Logseq, the open-source knowledge base. Its core functionality is creating, appending to, and viewing daily journal entries directly from the terminal, following Logseq's file naming and formatting conventions (Markdown or Org-mode). The tool provides a rich set of flags for targeting specific dates, searching pages via a trie-based index (including alias support), regex searching across journals and pages, and piping content from STDIN. It also supports indentation for nested list items and a configuration file in EDN format for persistent settings. The architecture is a single-binary monolith with clear separation into config, system (file I/O, editor launch), trie, todo state cycling, and an EDN validator module. While the tool is tightly coupled to Logseq's directory structure (journals/ and pages/ folders), the underlying components like the trie search, file appending logic, and configuration loading are well-isolated and could be reused in other Go projects with minimal adaptation.