top | item 26730110

(no title)

hcho | 4 years ago

I would not call adding two binary numbers algorithmic.

Having candidates write code is always a good filter. You'd be surprised by the amount of people who can't write a nested loop with a decade of experience under their belt.

discuss

order

decafninja|4 years ago

Playing devil's advocate, and being on both sides of the interview, I've noticed that a lot of people new to the leetcode interview game see nested loops as deathly evil and desperately try to find some "trick" or "gimmick" algorithm that would let them avoid it.

I was guilty of it too. I wasted a lot of interview time trying to spot the nonexistent gimmick when the optimal (or at least good enough) solution was in fact, utilizing a nested loop.

If you have a decade of real world experience under your belt, your first instinct would probably be to just write code that uses nested loops and perhaps refactor and optimize as necessary for performance.

But now in the leetcode interview game, you're often forced into a situation to prematurely optimize everything to get the "optimal solution" without running out of time.

hcho|4 years ago

That would still tell me something about the candidate. That they don't double check their assumptions is not a great sign.

For the record I always encourage candidates to start with the simplest solution and tell them we can then chat about improvements after we get the basics right.

beforeolives|4 years ago

I've heard this a few times before and I still don't get it. How do these people survive and manage to keep a job?