upsolve
Guides users from a working but suboptimal LeetCode solution toward a better optimization approach without revealing it, focusing on performance rather than correctness.
Instructions
Given a working but suboptimal solution, nudges the user toward a better approach without revealing it. Focuses on optimization, not correctness.
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>",
"solution_code": "<solution_code>"
},
"name": "upsolve"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| problem | Yes | The full LeetCode problem statement | |
| solution_code | Yes | The user's current working solution |