Master selection and implementation of data structures. Learn when to use arrays, lists, trees, graphs, heaps, and hash tables for optimal performance.
Select optimal data structures for specific use cases and performance requirements. Triggers when analyzing algorithmic problems, optimizing code performance, or choosing implementations for search, insertion, deletion, and traversal operations.
/plugin marketplace add pluginagentmarketplace/custom-plugin-computer-science/plugin install computer-science-plugin@pluginagentmarketplace-computer-scienceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/ds_templates.yamlreferences/DATA_STRUCTURES_GUIDE.mdscripts/ds_analyzer.pyskill_config:
version: "1.0.0"
category: implementation
prerequisites: [cs-foundations]
estimated_time: "6-8 weeks"
difficulty: intermediate
parameter_validation:
structure_type:
type: string
enum: [array, list, tree, heap, hash, graph, trie]
required: true
operation:
type: string
enum: [search, insert, delete, traverse]
retry_config:
max_attempts: 3
backoff_strategy: exponential
initial_delay_ms: 500
observability:
log_level: INFO
metrics: [structure_usage, operation_complexity]
Choose the right structure for every problem. Master operations and trade-offs.
Arrays
Linked Lists
Stacks
Queues
Binary Search Trees
Balanced Trees
Heaps
Hash Tables
| Need | Best Structure |
|---|---|
| Random access | Array |
| Frequent insertions/deletions | Linked list |
| Min/max element | Heap |
| Ordered traversal | BST |
| Fast lookup | Hash table |
| Prefix matching | Trie |
| Relations | Graph |
| Operation | Array | List | BST | Hash | Heap |
|---|---|---|---|---|---|
| Search | O(n) | O(n) | O(log n) | O(1) avg | O(n) |
| Insert | O(n) | O(1)* | O(log n) | O(1) avg | O(log n) |
| Delete | O(n) | O(1)* | O(log n) | O(1) avg | O(log n) |
| Issue | Root Cause | Resolution |
|---|---|---|
| Hash collision storm | Poor hash function | Improve hash, use chaining |
| Tree degenerates | Sorted insertions | Use balanced tree (AVL/RB) |
| Memory exhaustion | No size limits | Add capacity limits |
| Iterator invalidation | Modify during iteration | Use safe iteration pattern |
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.