3 ms·
Current answers are dealing with the technical aspect of the question, I'm gonna go in the other direction slightly. I've gone through a couple of leetcode sty
by tra3 5y ago
Current answers are dealing with the technical aspect of the question, I'm gonna go in the other direction slightly.
I've gone through a couple of leetcode style interviews recently. Basically it's either you've seen the question or have done a similar style question. I don't see how you can solve a question like that during an interview otherwise.
I'm sure some people can solve things like that on the spot, but their minds must work differently than mine.
I liked one of the comments on leetcode.com that basically amounted to:"some guy wrote a phd to solve this problem and 30 years later we're now expected to solve this in under 30 minutes in artificially stress induced conditions".
- decafninja 5y agoThis. You need to grind leetcode enough that you can match the interview question to the leetcode problem. The best case scenario is that you get the exact leetcode problem more or less. Then you put on a show pretending like you've never seen it before and act like you serendipitously arrive at the optimal solution via iterating it from a naive one. Less than ideal, but still great is when it's not a perfect match but you can recognize the pattern required to solve it - which comes from grinding. There are a finite number of patterns and sub-patterns into which many interview questions fall into. You could still end up unlucky enough to get a question that does not, but at the end of the day, it's matter of optimizing your chances.
- jeffybefffy519 5y agoIts the problem with these kinds of interviews, its basically filtering for one kind of candidate which is why all the big tech places lack diversity.