Data structures

From rnavarych/alpha-engineer · View interactive version

Data structures is an AI agent skill from the GitHub repository rnavarych/alpha-engineer. Implements and selects optimal data structures — hash tables (chaining, open addressing, Robin Hood, cuckoo), balanced BSTs (AVL, Red-Black, B-trees), heaps (binary, Fibonacci, pairing), tries, skip lists, segment trees, Fenwick trees, Bloom filters, Count-Min Sketch, HyperLogLog, and Union-Find. Us

How to use this skill

Skill file

Data Structures

When to use

Core principles

  1. Access pattern first — select for how the structure is queried, not what is most familiar
  2. Load factor controls hash table performance — keep below 0.75 for open addressing
  3. B-trees exist because disks exist — in-memory trees should not use disk-page logic
  4. Segment tree when updates + queries interleave; Fenwick tree for prefix-only — do not overengineer
  5. Union-Find is underused — path compression + union by rank gives near-O(1) for connectivity

Reference Files

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.