Live data from Hacker News

Avoiding Leetcode Anxiety

leetcodetherapy.com

101–110 of 157 posts

Re: Avoiding Leetcode Anxiety

#101
post #24

Don’t want to do Leetcode? Me neither — after I left Airbnb I vowed to not work at any company that asks this kind of question. I interviewed at a bunch of interesting companies (Airtable, Brex, Eaze, Figma, Lob, Notion, ...) none of which asked this kind of algo brain teaser question. There are tons of places out there with great product, interesting problems, and good compensation - so if you hate this bullshit, do…

In the past decade I have politely declined to answer leetcode style questions in interviews. I’ll offer to discuss how to solve coding problems in general terms, and I’ll happily whiteboard diagram solutions, but I will not code on a whiteboard or on a computer set up for the purpose in an interview.

While interviewers are initially surprised at my unwillingness to answer such questions, it often starts a short discussion about interview practices, and my observations about fantastic high-performing colleagues who have been passed over because they failed at interview coding challenges.

Thus far I haven’t lost an opportunity by declining to do coding exercises. In contrast, the couple of times I’ve played the leetcode game, I’ve lost the opportunity despite doing very well in the other interview phases.

I realize I have an advantage of being in this business for 30 years, having a lengthy and robust CV, and having been a hiring manager who can talk about my own experiences of being the interviewer rather than the interviewee.

Re: Avoiding Leetcode Anxiety

#102

You really need to decide in advance what you want to get out of LeetCode. It has a lot to give. For example, some LeetCode questions are textbook problems. You really should familiarize yourself with them, but you will probably never see them verbatim on an interview. Other LeetCode questions are too tedious or time-consuming to do on a whiteboard in an hour. You will also not see them on an interview. For some peop…

> Other LeetCode questions are too tedious or time-consuming to do on a whiteboard in an hour. Afaik all leetcode problems are from contest where thousands of ppl solve 4 in 1 hr. Its unlikely that there are questions which cannot be solved in 1 hr whiteboard.

Let’s hope they don’t upgrade the difficulty to that level. It’s already 2 in 45 minutes.

Re: Avoiding Leetcode Anxiety

#103

IMO getting better at Leetcode problems is similar to getting better at mathematics and physics - you become familiar on a topic by doing problems on a daily basis, trying to wrap your mind around the concepts and at times doing a bit of drilling just to stamp the things that need to be memorized. Both require you to be disciplined and dedicate time on a daily basis, otherwise you won’t get further. Having the time t…

I am from a poor background and I did the same thing. There was more important stuff to worry about than Leets. I'm only focusing on it because I'm already successful now and just want to take things to the next level and get "better" work.

Re: Avoiding Leetcode Anxiety

#104

> Here's all you need - master 100 problems first, then slowly progress to maybe 200 more problems. Do it well, and you can crack several top companies. Memoizing 300 questions isn’t easy

This is actually the hard part for me. Like I guess I can memorize some questions but not 300. Also how long should I bang my head against the wall before looking up the solution?

Should I just be looking up solutions instead of even trying to solve them if the goal is just memorization?

Re: Avoiding Leetcode Anxiety

#105

Earlier quoted context omitted.

I still don't see the memorization part. The last time I touched quicksort was at uni, three years ago, I still understand how it works (choose a pivot, partition the rest according to the elements' relation to the pivot, then quicksort the partitions), and I'm pretty sure I'd be able to implement it right now. Maybe not in C, but in Ruby, absolutely. Understanding is the hard part, the implementation should be the a…

"I still understand how it works" is memory. Maybe you have an amazing memory but imagine 15 years later.

Right. At some point I could write quick sort out in my head, on paper, in a terminal. Right now? Not a chance.

Re: Avoiding Leetcode Anxiety

#106
post #17

What’s a good way to pickup CS skills in a well rounded manner outside of a CS degree? Moving from Sysadmin to DevOps rolls and need to learn this stuff.

For a very basic intro, "A common sense guide to data structures and algorithms" and "Grokking algorithms" are a couple of good books.

+1 for A common sense guide to data structures and algorithms

Re: Avoiding Leetcode Anxiety

#107
post #79

I honestly think leetcode is a pretty terrible way to learn how to do algorithm problems, especially without a formal education in algorithms. The large test case bank is the most useful feature. The discussion and solutions shared on the site tends to be lacking in breadth and depth. I was happier to learn algorithms properly via the algorithms Coursera course taught by Sedgewick. The next time I need to go through…

You need both. The theory is important for seeing what class of problem you're trying to solve and to give you an idea of what general approaches might work. The actual problems are needed to get you skilled in actually applying the theory and for learning how to adapt the basic algorithms/techniques under different conditions.

This is so on the money. Leetcode/hackerrank are one form of practice, but they're not comprehensive. They're like a practice putting green or a driving range. Very useful practice, but they teach you how to swing the club not how to golf.

Re: Avoiding Leetcode Anxiety

#108
Back in my uni times I remember helping out a few of my friends from CS course by doing pair programming with them (I myself was taking mechanical course, I was not good enough with math and physics to get a place in CS course). They was asking me how do I do this, that I sit down and start solving their problem like I knew the solution despite the fact I have seen each problem for the first time. I used to tell them, that if they cut through enough of problems they will be the same.

From the perspective of time I think there was one thing that I had and most of my CS friends did not - programming was my hobby and I loved everything related with computers, they only wanted the end result which was good money and stable job.

Would I do 1500 leetcode problems? Maybe when I was younger and had no commitments, but certainly not now.

From perspective of years I see that leetcode is quite far from what I do on daily basis, and I do write quite a lot of code.

If I went to the job interview and was given a problem I have never faced before I would want the interviewer to see me finding the solution and not giving memorized (or practiced) answer. If result was not great and interviewer decided I'm not fit for the role that's better outcome than to give false impression and then struggle (even if interview problem is nowhere close to what they do in daily basis).

Re: Avoiding Leetcode Anxiety

#109
post #107

Earlier quoted context omitted.

You need both. The theory is important for seeing what class of problem you're trying to solve and to give you an idea of what general approaches might work. The actual problems are needed to get you skilled in actually applying the theory and for learning how to adapt the basic algorithms/techniques under different conditions.

This is so on the money. Leetcode/hackerrank are one form of practice, but they're not comprehensive. They're like a practice putting green or a driving range. Very useful practice, but they teach you how to swing the club not how to golf.

Except all that interviews test is the driving range part.
Post reply on HN