name: solution-explainer description: 生成算法解决方案的清晰解释 allowed-tools:
- Read
- Write
- Grep
- Glob
解决方案解释器技能
目的
为面试、学习和文档生成清晰、具有教育意义的算法解决方案解释。
能力
- 分步解决方案讲解
- 时间/空间复杂度解释
- 替代方法比较
- 常见错误高亮
- 可视化辅助生成
- 面试风格解释格式
目标流程
- 面试问题解释
- LeetCode问题解决
- 模拟编码面试
- 算法实现
解释框架
- 问题理解:清晰地重述问题
- 方法概述:高层策略
- 算法细节:逐步分解
- 复杂度分析:时间和空间复杂度及理由
- 代码讲解:带注释的实现
- 边界情况:处理的特殊场景
- 替代方案:其他有效方法
输入模式
{
"type": "object",
"properties": {
"problem": { "type": "string" },
"solution": { "type": "string" },
"language": { "type": "string" },
"depth": {
"type": "string",
"enum": ["brief", "standard", "detailed"]
},
"includeVisuals": { "type": "boolean", "default": false },
"interviewStyle": { "type": "boolean", "default": false }
},
"required": ["problem", "solution"]
}
输出模式
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"explanation": { "type": "string" },
"complexity": { "type": "object" },
"commonMistakes": { "type": "array" },
"alternatives": { "type": "array" },
"visuals": { "type": "array" }
},
"required": ["success", "explanation"]
}