We’re going to be covering LeetCode tips in the coming year. But before we get to the tips, I’d like to discuss why I chose LeetCode as a study topic, so you can decide if this year’s project is right for you.
I chose LeetCode because:
It focuses on coding interviews: There are several reasons you might want to study algorithmic coding problems. But for this year’s project, we’re going to focus on one: Preparing for a coding interview. We won’t ignore the other reasons entirely, but the focus will be on the practical goal of getting better at the coding interview process. This aligns with LeetCode’s strengths, as compared to a competitive programming site like Codeforces or a general textbook like Introduction to Algorithms.
It has an active community: There are other sites for building coding interview skills. But LeetCode’s popularity gives it some advantages compared to other sites: It has an active discussion section for every problem, two weekly contests generate a regular supply of fresh problems, and the LeetCode company receives enough income to keep the site up to date. There are many programmers with the goal of preparing for interviews, and we might as well go where most of them are.
It supports regular practice: The way to get better at coding interview problems is to write code and see how it performs on tests. This matches the core LeetCode practice loop: Read a problem, design and implement a solution, run it on test data, and try again (or move on to the next problem).
The tips we’ll be covering this year promote two goals: 1) Practicing coding interview problems, and 2) Understanding the solutions to these problems. LeetCode has a similar structure. The online judge supports practice. And to help with understanding the solution, each problem gets a throughout analysis by LeetCode in the official solution and by community members in the discussion forums.