Apply advanced DP optimizations automatically
Scanned 9/2/2026
Install to Claude Code
npx -y skills add a5c-ai/babysitter --skill dp-optimizer --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Dp Optimizer?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/a5c-ai-dp-optimizer-babysitter)More formats (shields.io, HTML) on the badges page.
---
name: dp-optimizer
description: Apply advanced DP optimizations automatically
allowed-tools:
- Read
- Write
- Grep
- Glob
- Edit
graph:
domains: [domain:computer-science]
specializations: [specialization:algorithms-optimization]
skillAreas: [skill-area:dynamic-programming]
roles: [role:backend-engineer, role:computational-scientist]
---
# DP Optimizer Skill
## Purpose
Apply advanced dynamic programming optimizations to improve time and space complexity of DP solutions.
## Capabilities
- Convex hull trick detection and application
- Divide and conquer optimization
- Knuth optimization
- Monotonic queue/deque optimization
- Alien's trick / WQS binary search
- Rolling array optimization
- Bitmask compression
## Target Processes
- dp-state-optimization
- advanced-dp-techniques
- complexity-optimization
## Optimization Techniques
### Time Optimizations
1. **Convex Hull Trick**: O(n^2) -> O(n log n) for certain recurrences
2. **Divide & Conquer**: O(n^2 k) -> O(n k log n) when optimal j is monotonic
3. **Knuth Optimization**: O(n^3) -> O(n^2) for certain interval DP
4. **Monotonic Queue**: O(n*k) -> O(n) for sliding window DP
### Space Optimizations
1. **Rolling Array**: O(n*m) -> O(m) when only previous row needed
2. **Bitmask Compression**: Reduce state space with bit manipulation
## Input Schema
```json
{
"type": "object",
"properties": {
"dpCode": { "type": "string" },
"stateDefinition": { "type": "string" },
"transitions": { "type": "string" },
"currentComplexity": { "type": "string" },
"targetComplexity": { "type": "string" },
"optimizationType": {
"type": "string",
"enum": ["auto", "convexHull", "divideConquer", "knuth", "monotonic", "space"]
}
},
"required": ["dpCode", "optimizationType"]
}
```
## Output Schema
```json
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"optimizedCode": { "type": "string" },
"optimizationApplied": { "type": "string" },
"newComplexity": { "type": "string" },
"explanation": { "type": "string" }
},
"required": ["success"]
}
```
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!