Leetcode Problems
Here I have my solutions to many leetcode problems that I solve to practice and learn more about data structures and algorithms.
acederberg, datastructures, algorithms, leetcode, interview
What is Leetcode?
Leetcode is a platform for data structures and algorithms problem solving competitions. When a solution is submitted, it is run against many test cases and data on runtime and memory usage are collected. Competitors can see how their solutions ranked in runtime and memory as compared to all submitted solutions.
Why Even Keep Notes About Leetcode Problems?
Data structures and algorithms is an essential problem in computer science and I find them to be quite fun. I wanted to keep notes on the problems I solve because I have always found that taking notes has allowed me to fully analyze a problem. I also think that much of the work in solving these problems is in the analysis.
Few people sit down and immediately understand what they are going to implement without some planning and analysis. In fact, I would argue that it is bad practice to not consider the solution before implementation.
On top of this, there are a few more reasons worth listing here:
- I like to edit in
vim
, and writing out my code in vim is preferable, - As I improve, I can come back and look at my solutions and analyses to improve (analyzing my analysis - meta-analysis),
- All solutions are tested and it is easy to setup
pytest
cases for each problem to avoid having to work inleetcode
’s editor.