Segment tree builder
Skill a5c-ai/babysitter/library/specializations/algorithms-optimization/skills/segment-tree-builder
Generate customized segment tree implementationsFrom its SKILL.md
npx -y skills add a5c-ai/babysitter --skill segment-tree-builderAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
2.1 KB, 455 tokens by cl100k_base, as published. Nobody here has run it
Segment Tree Builder Skill
Purpose
Generate customized segment tree implementations for various merge functions, with support for lazy propagation and advanced variants.
Capabilities
- Generate segment tree for custom merge functions
- Lazy propagation template generation
- Persistent segment tree variants
- 2D segment tree generation
- Segment tree beats for complex updates
- Iterative vs recursive implementations
Target Processes
- segment-tree-implementation
- range-query-optimization
- data-structure-implementation
Segment Tree Variants
- Basic: Point update, range query
- Lazy Propagation: Range update, range query
- Persistent: Version history preservation
- 2D Segment Tree: 2D range queries
- Segment Tree Beats: Complex range updates (chmin, chmax)
- Merge Sort Tree: Range order statistics
Input Schema
{
"type": "object",
"properties": {
"mergeFunction": { "type": "string" },
"identity": { "type": "string" },
"updateType": {
"type": "string",
"enum": ["point", "range", "both"]
},
"lazyPropagation": { "type": "boolean" },
"variant": {
"type": "string",
"enum": ["basic", "lazy", "persistent", "2d", "beats"]
},
"language": {
"type": "string",
"enum": ["cpp", "python", "java"]
},
"style": {
"type": "string",
"enum": ["recursive", "iterative"]
}
},
"required": ["mergeFunction", "identity"]
}
Output Schema
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"code": { "type": "string" },
"complexity": { "type": "object" },
"usage": { "type": "string" }
},
"required": ["success", "code"]
}
What ships with it: 1 file
721 B alongside SKILL.md
- README.md721 B