Status: Student at the time, now new grad, Top 50 School according to some website's ranking
Position: New Grad Software Engineer at Facebook
Location: Menlo Park, CA
Date: April 2020
Technical phone screen (45 minutes):
I struggled with a bit w/ linked list because I hadn't practiced it by the time of the interview, but I ended up getting both right with optimal time complexity (with extra time given by the interviewer).
They got back to me in 3 days and was invited to schedule a virtual onsite within the next two weeks.
Virtual Onsite (4 rounds):
For this round, I struggled on the second question but ended up getting it. I felt like the interviewer kind of explained how the solution should go but I coded it up at the end of the day. We ran a bit into the next interview but they still let me ask them questions. Got both with optimal run time and answered clarifying questions about the solutions.
This was my best round. Understood both of the problems as they were explained to me. I still asked questions to clear up any assumptions ("Can the tree be empty?" and the like). Got both with optimal runtime and answered clarifying questions about the solutions. The interview ran a bit out of the time period because it started a bit late.
Result: I heard back about 2 weeks later that I got an offer. Was told that there wasn't much discussion and I was an "obvious" hire.
Prepping:
Main main resources in prepping were:
I spent about 3-5 weeks prepping. I hadn't prepped for a coding interview before, so my data structures and algorithms knowledge was lacking. I didn't practice questions everyday. Somedays I'd just look at Glassdoor and the interview experience/question sections on LeetCode to just see the types of questions I'd be asked. When I'd look at the questions, I'd think about how I'd approach it and if I didn't have a general idea of what to do, I'd look up the answer.
When I actually was practicing, I'd attempt the problem. If I got something I thought was a working solution, I'd try it. If it passed, I looked at the editorial and see what other approach I could have done. If it didn't pass (or I couldn't think of an answer), I'd look at the discussion pages for hints, then try and attempt it again. I'd keep giving myself hints until I could solve it. If the hints didn't work, I'd read the solution until I got some new insight and then attempt it again. If I still had trouble, then I'd read the whole solution and just code it.
I'd spend at least an hour (max 2-3) thinking through the problem before looking for hints. I think doing this helps give me in-depth knowledge about the problem and what its asking at its core. Being able to understand the core of problems helps you because two problems may be different, but their cores are the same. (Essentially, familiarizing yourself with different types of problems and improving your ability to recognize the "type" of the problem). For max time spent on a problem, I think it was around 5 hours. At the beginning, mediums took me on average at least 2-3 hours each.
I also kept a notebook that I used when solving each problem. I'd write down my thoughts, examples, drawings, pseudocode, and runtime and memory analysis for each problem. I thought it would be helpful because it archives your thoughts and approaches that might be useful for future problems. Also, since its written in your words/style, it should be easier/quicker for you to gain the knowledge again if you need to prep for an interview in the future.
I deemed that I was comfortable with a topic if I looked at a question and knew pretty much what the overall solution would entail. This means that I might mess up a bit in coding the solution, but I'd be able to catch myself if that ever arose.
At the end of the day, I've done ~60-70 problems, with 43 from the interview prep kit(11 easy, 24 medium, 8 hard) and the rest coming from a combination of CTCI, LeetCode (only 6 easy, 2 medium), and company provided resources. I've probably looked/mentally sovled/read the solution for about an additional 30 problems however.
So, a total of ~100 problems "solved."
Timeline: From application sent to offer was around a month and a half