As we saw in Tip 31: Learn Problems and Sub-Problems, you sometimes need to learn a skill that’s smaller than a full LeetCode problem. Tip 31 explains how you can use the standard LeetCode interface to learn concepts at the sub-problem level. But there’s another way to accomplish that goal by using a REPL. The […]

Continue## LeetCode Tip 37: Understand Your Test Cases

You can’t debug a LeetCode solution without studying test cases, the textual input that every LeetCode program is required to process. The LeetCode platform verifies that every test case, whether an official test case or one you invent, meets the formatting and range specifications from the problem statement. The platform also gives you the correct […]

Continue## LeetCode Tip 36: Debugging Advice

LeetCode debugging is different from real-world debugging. But as in the real-world, you sometimes have to debug your LeetCode solutions. So it’s worth learning the techniques that work best for LeetCode-style programming. According to the model solution approach, the goal of LeetCode practice is not just to get your submission accepted, but to learn the […]

Continue## LeetCode Tip 35: Debug Prudently

When you write a LeetCode solution, it may have bugs. This is one way in which LeetCode programming and real-world programming are similar. But debugging your LeetCode solution doesn’t always work the same way as debugging your real-world code. In the real world, when someone gives you a task, you’re the one person responsible for […]

Continue## LeetCode Tip 34: Write Your Own Textbook

The study process that I describe in these tips is based on model problems and model solutions. To write a good model solution, you can learn a process for writing it and the format that makes it most useful. The goal of LeetCode practice is to learn all the common problem types. Model solutions best […]

Continue## LeetCode Tip 33: Prioritize Understanding

When you’re working on a challenging LeetCode problem, it’s easy to spend a lot of time on it. As long as you can keep thinking of ideas to try, you can keep adjusting your code to see if it improves your results. If your solution fails on large test cases, you can try to optimize […]

Continue## LeetCode Tip 32: Minimize the Time You Spend on Each Problem

When you’re working on a LeetCode problem, there is always a solution available, either the official solution or a solution from the discussion forums. So, as you’re working on your own solution, you always have the option of getting help. Your study strategy, therefore, needs to tell you how long to work on a problem […]

Continue## LeetCode Tip 31: Learn Problems and Sub-Problems

Consider this scenario: You’re repeating a problem. You skim the problem description and remember a good approach to use. You start implementing the solution, since you know the steps for the algorithm. Then at some point in the implementation, you get stuck. Maybe there’s some language syntax that you don’t use very often. Maybe you […]

Continue## LeetCode Tip 30: The Problem-Solving Hierarchy

As you get more experienced at LeetCode practice, you can envision a hierarchy of problem-solving skills, where each level helps with a different aspect of problem-solving. At the base of the hierarchy is the most concrete skill: Learning a model solution and using what you learn to solve the specific problem for which you wrote […]

Continue## LeetCode Tip 29: Use a Problem-Solving Process

Learning a model solution is worthwhile because it gives you a process for solving similar problems. If you know how to analyze and solve one binary search problem, you can apply it to similar situations where you have sorted data and need to search for a target value. The more model solutions you know, the […]

Continue- « Previous Page
- 1
- 2
- 3
- 4
- …
- 47
- Next Page »