Data Structure Selection

Choosing optimal data structures based on access patterns and performance requirements.

48 stars 10 forksOther Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add sethdford/claude-skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add sethdford/claude-skills --skill data-structure-selection
Manual install
git clone --depth 1 https://github.com/sethdford/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/engineer/implementation-patterns/skills/data-structure-selection ~/.claude/skills/data-structure-selection

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Data Structure Selection

Matching data structures to your performance requirements.

## Context

You are selecting data structures. Understand tradeoffs: access time, insertion, deletion, memory.

## Domain Context

- **Array**: O(1) random access; O(n) insertion
- **Linked List**: O(n) random access; O(1) insertion (if you have pointer)
- **Hash Table**: O(1) average access; O(n) worst case
- **Tree**: O(log n) balanced access; O(n) unbalanced
- **Heap**: O(1) min/max; O(log n) insertion

## Instructions

1. **Analyze Access Patterns**: Read-heavy? Write-heavy? Random access? Ordered?
2. **Identify Bottleneck**: Insertion? Lookup? Iteration?
3. **Compare Options**: List pros/cons of 2-3 structures
4. **Benchmark**: If unclear, measure with realistic data
5. **Choose**: Select structure with best worst-case for bottleneck
6. **Monitor**: Track performance; be ready to change if patterns shift

## Anti-Patterns

- Choosing structure based on familiarity not performance
- Not considering space overhead; 10x lookup speedup doesn't matter if memory explodes
- Using unbalanced trees; always use balanced (AVL, Red-Black, B-Tree)
- Ignoring cache locality; array beats linked list even with worse complexity
- Micro-optimizing data structures while algorithmic cost dominates

## Further Reading

- Donald Knuth, _The Art of Computer Programming_
- MIT OpenCourseWare, _Introduction to Algorithms_
Read the full skill on GitHub

Details

Skill name
data-structure-selection
Path
engineer/implementation-patterns/skills/data-structure-selection/SKILL.md
License
MIT
Repo updated
11 March 2026

FAQ

What does the Data Structure Selection skill do?

Choosing optimal data structures based on access patterns and performance requirements.

How do I install the Data Structure Selection skill?

Claude Code plugin: /plugin marketplace add sethdford/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Data Structure Selection popular?

It lives in sethdford/claude-skills, which has 48 GitHub stars and 10 forks.

Related skills

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.