recursive_thinking
Apply recursive strategies to structure problem-solving with base and recursive cases, analyze complexity, and optimize solutions.
Instructions
Applying recursive strategies to solve problems with base and recursive cases, including optimizations.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"problem": "<problem>",
"baseCases": "<baseCases>",
"recursiveCases": "<recursiveCases>",
"terminationConditions": "<terminationConditions>"
},
"name": "recursive_thinking"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | The domain or field this problem belongs to (e.g., 'algorithms', 'data structures'). | |
| problem | Yes | A clear and comprehensive description of the problem to be solved recursively. | |
| baseCases | Yes | The base cases that terminate the recursion. | |
| problemId | No | A unique identifier for this recursive problem analysis. | |
| testCases | No | Key test cases for validating the recursive solution. | |
| invariants | No | Properties that remain true throughout the recursive calls. | |
| optimizations | No | Possible optimizations for the recursive solution. | |
| commonMistakes | No | Common mistakes when implementing this recursive solution. | |
| inputSizeLimit | No | Practical limit on input size before stack overflow. | |
| recursiveCases | Yes | The recursive cases that break down the problem. | |
| similarProblems | No | Other problems that use similar recursive patterns. | |
| recursionPattern | No | The pattern of recursion used. | |
| stackOverflowRisk | No | Risk of stack overflow for typical inputs. | |
| complexityAnalysis | No | Detailed complexity analysis of the recursive solution. | |
| learningObjectives | No | What can be learned from this recursive analysis. | |
| iterativeAlternatives | No | Alternative iterative solutions. | |
| terminationConditions | Yes | All conditions under which the recursion will terminate. | |
| tailRecursionOptimizable | No | Whether the recursion can be optimized with tail recursion. |