Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> What does leetcode for code add if you can read a book about algorithms?

Quite a bit actually.

Even if one is familiar with various algorithms, many questions rely on some sort of critical insight or intuition that is difficult to unlock within that short span of time, and most importantly, satisfy the constraints of the problem being asked*.

Unfortunately, said insight can differ based on the problem, which is why the "Leetcode grind" is a thing; it is a process to train yourself to see the plethora of problems that may be asked.

* As an anecdote, I was implementing autocompletions on top of a text editing component for a personal project some time ago. While I was able to come up with an initial solution involving a binary tree, working out the individual cases allowed me to understand that my approach couldn't have been used as is. Upon some research, I found that there exists a similar thing called a "rope", although there's no way I could have come up with this solution in the context of an interview and would have been disqualified.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: