The way i prepared for coding interviews before i got my job at Facebook is a bit different from what most people suggest. I never forced myself to solve problems without using google. I would google the answer after i was stuck even for 1 minute
If i tried to solve it myself i'd easily spend 2-3 hours on one question and that seemed like a waste of time.
My process involved saving a bunch of interview questions in a folder and going through them as fast as possible. Don't know how the answer right away? no problem, google the solution and code it out (no copypasta tho).
This way i was able to go through a lot of questions every day. 20, maybe 30 pre day. After 100 or so i would delete all my solution and go through the same list again. Most solution i already remembered, some of them i forgot and had to google again.
I would go through the same list again and again until i can solve 100% of those question without using google. This way, instead of wasting time on staring at the question and trying to find the solution yourself i coded A LOT
What i found is that after 200-300 questions most of them start repeating themselves in different shape. The question might be different, but underlying problem is the same array sorting or tree traversal.
Eventually it got to the point where i couldn't find any questions that would surprise me. Every new question was "the same sorting but numbers are negative" or "instead of packing the backpack we're counting coins"
Coding a lot also makes you more familiar with the programming language you chose. It becomes almost like a native language. You don't spend minutes trying to figure out how to write that "for" loop. You just write it
You can follow @aarondjents.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: