CS concepts
LeetCode Solvesheet Explained: Any Problem on One Page in 4 Steps
Updated Dec 1, 2026 · 3 min read
Open app.edithly.com, paste the problem with a short ask such as 'Make a step-by-step solvesheet for LeetCode 91 Decode Ways', hit send, and you get one page that walks from the question to the idea, a worked table, the Python and a short summary. The page is built to be reviewed later, so you can cover the steps and redo them yourself.

Key points
- ●Four steps: open app.edithly.com, paste the problem, hit send, read the sheet.
- ●A good sheet goes question, idea, worked example, code, answer, summary.
- ●The Decode Ways sheet fills the table 1, 1, 2, 3 for "226" and lands on 3.
- ●The Now you try box turns the sheet into practice instead of reading.

Why one page per problem
Most LeetCode practice ends with a green "Accepted" and nothing to come back to. A week later the idea is gone and you solve the same problem from scratch. A solvesheet fixes that: one page per problem that goes from the question to the idea, a worked example, the code and a short summary. It's something you can reread in two minutes before an interview.
The 4 steps
- Open app.edithly.com. The home screen has one prompt box.
- Paste the problem. Name it and say what you want on the page: "Make a step-by-step solvesheet for LeetCode 91 Decode Ways."
- Hit send.
- Get the full solvesheet. It comes back as one long page with numbered steps.
Adding "with the idea, a worked example and Python" to the prompt keeps the page tight. If you're stuck on a specific part, say so in the same line ("show the table for 226").
What's on the sheet: Decode Ways as the example
The visual sheet above is the one from the walkthrough, for LeetCode 91 Decode Ways. In short, the problem: letters were coded as numbers (A is 1 up to Z is 26) and you count how many ways a digit string can be read back. For "226" there are 3: 2 2 6, 22 6 and 2 26.
The sheet walks it in six steps:
- Step 1, the valid groups. One digit works only for 1 to 9, two digits only for 10 to 26. A zero can't stand alone.
- Step 2, the state. ways[i] is the number of decodings of the first i digits, and the empty prefix counts as 1.
- Step 3, split by the last group. A decoding ends with either one valid digit or one valid pair, so ways[i] adds ways[i-1] and ways[i-2] when each one is allowed.
- Step 4, the table for 226. ways = [1, 1, 2, 3]. The final 6 brings 2 and the pair 26 brings 1.
- Step 5, two variables. The rule only looks back two places, so the table shrinks to two running numbers.
- Step 6, the code, a dry run and the edge cases.
| Prefix | Single digit adds | Pair adds | ways |
|---|---|---|---|
| "" | 1 | ||
| "2" | 1 | 1 | |
| "22" | 1 | 1 (22) | 2 |
| "226" | 2 | 1 (26) | 3 |
The code it ends on
def num_decodings(s: str) -> int:
if not s or s[0] == "0":
return 0
prev2 = 1
prev1 = 1
for i in range(1, len(s)):
current = 0
if s[i] != "0":
current += prev1
pair = int(s[i - 1:i + 1])
if 10 <= pair <= 26:
current += prev2
prev2, prev1 = prev1, current
return prev1
For "226" it returns 3, in O(n) time and O(1) extra space. The Final answer bar on the sheet says the same thing in one line.
Use the bottom of the page
Two boxes at the end make the sheet worth keeping. Now you try gives you fresh work: fill the prefix table for "121", decide what a final zero can contribute, dry-run the two variables on "11106". Cheatcode Summary is the whole method in five moves: define the state, check one digit, check two digits, add and shift, return the last count.
A good routine: solve the problem yourself first, make the sheet, compare your idea with Step 3, then close the page and do the Now you try list the next day.
Common mistakes
- Pasting only the number. "LeetCode 91" works, but naming the problem and the language gets you a cleaner page.
- Reading without redoing. The sheet helps most when you cover it and rebuild the table yourself.
- Skipping the edge cases. On Decode Ways the zero rules are where most wrong answers come from; Step 6 checks a leading zero before the loop.
Frequently asked questions
What is a solvesheet?
A one-page worked solution to a single problem. It restates the question, breaks the method into numbered steps with a small worked example, shows the code, states the final answer with its complexity and ends with a short summary you can review before an interview.
What should I paste into the prompt?
The problem name and number plus what you want on the page, for example 'Make a step-by-step solvesheet for LeetCode 91 Decode Ways, with the idea, a worked example and Python'. Naming the example and the language keeps the sheet focused.
How do I study with a solvesheet instead of just reading it?
Read it once, then cover the steps and redo them. The sheet's Now you try box gives you new inputs, such as filling the prefix table for "121" or dry-running the two variables on "11106", so you can check whether the idea stuck.
Is it free to make one?
You can make a solvesheet on app.edithly.com with a free account.