data-structure-chooser

Recommend lists, maps, or sets based on required operations and tradeoffs.

Updated Dec 28, 2025
One-click install
npx skills add https://github.com/oalansilva/crypto --skill data-structure-chooser-oalansilva
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-structure-chooser
Source: https://github.com/oalansilva/crypto/tree/main/.codex/skills/foundation/data-structure-chooser
Command: npx skills add https://github.com/oalansilva/crypto --skill data-structure-chooser-oalansilva

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Skill helps developers choose the most suitable basic data structure (lists, maps, or sets) for a given task, preventing inefficiencies and mistakes from ad-hoc choices.

Core Features & Use Cases

  • Guidance on when to use lists, maps, or sets based on operations like lookup, insertion, iteration, and ordering.
  • Clear explanation of time/space tradeoffs for common scenarios and a short example for real-world tasks, such as tracking a small set of items or counting unique keys.
  • Quick decision help for junior developers to confidently pick an appropriate structure.

Quick Start

Given a task description, recommend the most appropriate basic data structure (list, map, or set) and provide a brief usage example.

Frequently Asked Questions about data-structure-chooser

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right data structure for my task?

To choose the right data structure, identify the required operations like lookup, insert, iterate, and order, then match them to a list, map, or set based on time and space tradeoffs.

When should I use a set instead of a list?

Use a set instead of a list when you need to track a small set of items or count unique keys without duplicates, benefiting from faster lookup times and efficient uniqueness handling.

What are the tradeoffs between using lists, maps, and sets?

The tradeoffs between lists, maps, and sets involve time and space complexity differences for operations like lookup, insertion, iteration, and ordering, which determine the most efficient choice for your scenario.

How do I pick a data structure for counting unique keys?

Pick a map or set for counting unique keys because they handle uniqueness natively, providing efficient insertion and lookup performance compared to iterating through a basic list.

Can I get a usage example for a recommended data structure?

Yes, after identifying your required operations, you receive a recommended basic data structure with a brief real-world usage example demonstrating how to implement it for your specific task.