Leetcode gets a bad wrap it seems. Perhaps it is not so much Leetcode itself, as it is its use as an evaluation tool for interviews at Big Tech. People complain that it is not a fair reflection of one's skills as a software engineer. Would you rather hire a good leetcoder or someone with deep real world developer experience? While the nuances of this question may be worth exploring for hiring decisions, in my case, as someone without a computer science degree, it seems like it is in actuality an effective learning and skill assessment tool. I recently completed Leetcode's DSA crash course and I am happy to say that I feel like I have learned a ton. I have been coding in Python on and off for the past decade or so as a data scientist, but this is the first time I have actually felt like I am grasping some really fundamental computer science principles (I had this opportunity freshman year when I took COS 126 but unfortunately my academic performance that year was shockingly bad, so I am trying to make amends).
While this may seem obvious, the beauty of programming is that you can verifiably test your understanding of the theory you are in the process of learning by evaluating the output of your code. On the one hand this can be incredibly frustrating when you get stuck on a test case that your implementation just won't pass, but these instances usually reveal some subtle misunderstanding. Because you are repeatedly applying what you have learned (or think you have learned), it really solidifies the acquired knowledge. It is also very satisfying to move on from attacking everything with the naive use of for loops, if/else statements, dictionaries and lists. Once I finally grasped the concept of traversing a binary tree, I was able to move on to the concept of graphs, culminating with learning Dijkstra's algorithm and using it on a toy problem of optimizing flight cost within K stops. Working with Claude as my personal tutor also really helped me make progress and not get discouraged when getting stuck. I created a custom prompt for the AI to provide helpful hints but not the answer. This helped focus my thinking when I would get stuck and made the learning experience more enjoyable. It also helped me go down some fun rabbit holes (like understanding why looking up a value in a set is O(1) and getting a nice explanation of how array indexing works at the hardware level).
Being able to tie the theory back to real-world use cases is my favorite thing about computer science and applied math in general. Even though I am still a long way from being leet, I am happy with the progress have made relative to where I was 6 months ago. I don't know if I'll ever actually attempt a real coding interview, but even if I do not, the knowledge I have gained is very satisfying, and I hope is only the beginning of a long journey.
On Feb. 11, 2025 Adrien wrote:
that's really encouraging! glad it's working out for you, and that Claude was able to do all the work on your behalf.