Command Palette

Search for a command to run...

Назад к скиллам
скилл № 80142

data-structure-selection

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

БесплатноБез исполняемых скриптов
sethdfordот sethdford★ 51 звезда на GitHub

Установить data-structure-selection в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

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

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл data-structure-selection?

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

Как установить скилл data-structure-selection?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл data-structure-selection запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить data-structure-selection с