Status: 4.5 years experience at company local to me.
Position: E4 Software Engineer at Meta
Location: Remote (US)
Date Interviewed: December, 2021
Since I signed an NDA I will not go into the specific question but give a general sentiment of difficulty and how the problem went. While a lot of the questions are similar to leetcode they are not word for word copied from leetcode so do your best to study ideas and not memorize solutions. I also want to point out that I had a ton of rejections leading up to this and if you are interested in learning about my journey check out Coding Decoded on YouTube (can't post links). There is also a link to the resources that I used to study in the video and things that I thought were helpful.
In all cases for data structure and algorithms questions I followed basically a 6 step strategy. I outline that below as a template I used when going through these questions in my interviews.
Ask clarifying questions to understand the problem completely. If there is still not enough clarity, work with the interviewer. You can't solve a problem if you don't understand the question that you are being asked to solve. Don't under-estimate this step and don't make assumptions. If you go down the wrong path you will waste your time and it will be extremely difficult to make up.
Propose a solution by walking through it on the coder pad. Visually write out how the algorithm would perform with a small test cast so when it is time to code, the problem is already solved, and you just need to regurgitate it in the language of choice. At this step I would also mention time and space complexity and explain why this is probably the best we could do in terms of overall performance. This allows the interviewer to interject before you start coding if they think you can do better.
Write the code for the problem. Sort of funny, but this is actually probably the least important part. Obviously write good, clean code (and know useful libraries in the language you are coding in) but at this point it should be secondary because you've already solved the problem.
Walk through the code with some test cases and find any bugs / logic errocs that might be present.
Talk about different edge cases that could cause the algorithm to fail. You won't always have to address the edge cases in the code since it might drastically change the way the algorithm is built (I.E. using longs instead of ints in java) but the interviewers want to see that you are thinking about this and will mostly just ask what edge cases do you think could come up.
Confirm the runtime and space complexities. At this point the interviewer should basically say, "Yup looks good." Or interject somehow.
Question 1
Question 2
Thoughts
This interview was originally scheduled for a single day but, because of interview availability, some things had to be moved around. In the end, it consised of 4 rounds split into 3 days.
Day 1
Behavioral (1 round)
Day 2 - Data Structures & Algorithms (2 rounds)
Round1 of DS & A (3 questions)
Question 1
Question 2
Question 3
Round 2 of DS & A (2 questions)
Question 1
Question 2
Day 3
Systems Design (1 Round)
At Meta you can choose either Product Design or Systems Design. I honestly don't know the main difference between the two but if I had to guess, the System's Design tends to lend itself to build an entire system and dig deep into parts such as data partitioning and how to build other relevant services in a largely scalable system. From my understanding product design is more focused on API Design and building entities. In product you will still have to have a good knowledge of how a system is built but the interviewer may focus less on overall high level design and data partitioning and more on the previously mentioned things. Also, I don't represent Meta so take this with a grain of salt and if you have interviews coming up, check with your interviewer on expectations.
Moving into the interview.... I wasn't sure what to expect from this and tried to follow the general systems design guidelines. The interviewer drove me in a direction and it is important to take feedback and listen to what the interviewere wants to cover. In this round I focused on trade-offs. If I was asked a question I tried my best to give the top 2 or 3 answers and ultimately choose 1 and gave reasons why I thought this was the best. I felt like the discussion was good but was hard to judge since I didn't follow the exact steps I had studied for on a normal systems design interview.
Thoughts on Onsite
There is a lot of great resources out there and I would defer to Haseeb Qureshi's negotiation tips (type into google because I can't post links) when negotiating as he is much smarter and better at it than I am. I did write a few useful tactics down that you can use when negotiating.
The best way to negotiate is to have a counter offer in hand, but for a lot of people, that may not be a reality.
Something else you can do is leverage your current position.
If your current job pays X but you want to make Y. Be transparent with the recruiter that you are very excited with the offer but there is uncertainty when leaving your current job and if they can hit target Y, you will sign.
Having a job is a negotiation tactic whether people think so or not. There is always an opportunity cost when moving from one position/company to another. If you are coming from a smaller company like I was, this may not work the best, but if you are coming from another competitor it could be beneficial.
One thing I did, that I thought was very helpful (I would only do this if you are going to go through with it), was to tell the recruiter how excited I am to get an offer and that they are my main choice. In this case, the company was my top choice, and I let them know that I would be willing to stop interviewing (I had interviews still ongoing with other FAANG companies) if they were able to hit specific numbers.
It is really hard but you will never feel prepared before an interview (at least I never did). There is always another question that might be asked, and always a new topic that can be discovered to get better at data structures and algorithms. Realize that there is no "perfection", but strive to reach it, and go into every interview with an open mind.
There is also a million reasons why you may not have been selected for a position that are outside of your control. Maybe a company is just fulfilling interviewing number obligations and they dont plan on hiring anyone. Maybe another candidate is a genius and obliterated their interviews. Maybe the interviewer is having a bad day or doesn't like the t-shirt you are wearing so gives you a bad grade. My point is, often times it isn't you and interviewing can be a numbers game. If you didn't get the offer, screw that company and move on. Focus on enjoying the experience and getting better and don't focus on bad questions or not passing the interview.
The definition of bravery is: The quality or state of having or showing mental or moral strength to face danger, fear, or difficulty.