LeetCode
Last week, I spent 11 hours solving problems on LeetCode. Bloggers online say that LeetCode-type tasks are currently important for employers, as they use them to check whether a candidate knows the fundamentals of algorithms without the help of LLMs. How true this is, of course, I don’t know, but I am working through the problems. I originally planned to program new features for my personal website, but I couldn’t bring myself to work on that project, so I took LeetCode as a temporary alternative. I write the code for the tasks by hand.
Problems I’ve completed:
- 208. Implement Trie (Prefix Tree) 🟡 Medium
- 210. Course Schedule II 🟡 Medium
- 211. Design Add and Search Words Data Structure 🟡 Medium
- 212. Word Search II 🟥 Hard
In the Course Schedule II task, I had to learn how to write Topological Sorting. While figuring it out, I realized that I once wrote that very same sorting incorrectly in a client’s code—a long time ago.
The last problem, Word Search II, was mind-blowing. It took me 4 hours to fully understand it and write the code. The trick of the problem is that the grid of letters is small—only 12x12—but the number of words that need to be found in that grid is large: 30k.