Personally, I find it easy to slip into a lazy mode of programming while solving a Leetcode problems one after the other: I find a good solution, I code it out and begin iterating on it and testing it to work bugs out. Unfortunately, in an interview setting, you will not be able to hit the "run" button repeatedly to test different scenarios and find cases you hadn't considered. I find it helpful to have a "method" text file open next to me while solving these problems to train my brain to solve the problem out loud and debug the program before I begin writing it and after I finish a "first draft."
The method:
0. Read the instructions
1. Read the instructions again
2. Ask questions about the problem
2a. Ask about inputs
2b. Ask about output
2c. Ask about additional space
3. Design the algorithm aloud
3a. describe brute force
3b. describe improvements
4. Find time and space complexity
5. Identify edge cases
6. Write first pass of code
7. Check for typos
8. Check for bugs
9. Check for edge cases
10. Run