post_solution
Generates a structured LeetCode discussion post from your accepted solution, covering approach, complexity, estimated beat percentage, and why it outperforms brute force.
Instructions
Takes a user's accepted solution and generates a structured LeetCode discussion post with approach, complexity, estimated beat %, and why it's better than brute force.
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": "post_solution"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| problem | Yes | The full LeetCode problem statement | |
| language | No | Programming language, e.g. Python, Java (auto-detected if omitted) | |
| solution_code | Yes | The user's accepted solution code |