Just wanted to share my experience interviewing with Meta for an E5 role. My background is: 6.5 yoe (4.5 years at a big fin-tech, followed by 2 years in a mid-sized pure tech company)
Phone Screen Q1. Variation of https://leetcode.com/problems/random-pick-index/ Given array, generate random index of highest element. (There could be multiple highest elements and in that case, the index generation should have equal probability)
My comments: I made the mistake of assuming that the generateIndex function will be called multiple times and hence started on the approach of storing the indexes of the highest element in an array and then using the random function to print out a random index. The interviewer then asked me to think of an O(1) space solution and that's when I realised they weren't looking for this optimization.
Ended up implementing the following:
Time complexity: O(n). Interviewer seemed happy with this.
Q2. Given input of the sort [2, [2, 3, [2, 2, 3], 4], 5] find total depth sum. https://leetcode.com/problems/nested-list-weight-sum/description/
My Comments: I had been using Java for the interview and for this question, the interviewer did not provide the custom type and asked me to design the input structure myself. Because of the missteps in the first question, I felt like I already had lesser time. I asked the interviewer if they were okay with me switching to Python to implement this question and they said yes.
I ended up using the much simpler Python syntax to check for the presence of an integer element vs. a list element and implementing a recursive approach to flatten out the list and calculate depth sum.
The interviewer seemed happy with this O(n) time and O(n) space approach where 'n' is the size of the flattened list. O(n) space because of the recursive depth that might be reached.
I moved to the on-site round post this
On-Site Coding Round 1 Q1. Given 2 nodes of a tree find their first common ancestor. Node has pointers to its children and to its parent. https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree-iii/description/
My Comments: I was too nervous for the on-site round and I ended up being a little trigger happy after reading the first part of the question. I hadn't solved the leetcode equivalent of this before and hence was an unseen question. I mistook this as the question where the root would be given to us and I had to find the LCA based on the values of the nodes. After wasting 5 minutes loud thinking through a solution, the interviewer asked me to read the question again.
I still missed the point, only to realise 3 minutes later. Fortunately the solution struck me immediately after and I was able to code it in the next 6-7 minutes, completing the question within the rough 20 minutes budgeted for the first question.
Q2. Find shortest path in matrix, output distance. Follow-Up: Change approach to track the path and output path.
My Comments: The first part was pretty simple and I went with the bfs approach to get it done. I got a brain freeze at the output path step and had to be prodded by the interviewer to consider storing previous path values in the visited matrix than a simple visited boolean check. I was able to implement the changes for tracking the path but lost out some time towards the end to print the path.
The interviewer having to prod me to use the visited matrix differently is something that I think I got a lot of negative marks for.
Behavioral I don't clearly remember all the questions. But the interview started with "Talk about a project that you are most proud of". Once you start answering this question, the interviewer starts digging into your answer with follow-ups around "Did you have a conflict in this project" to "how did you manage changing priorities" etc.
Overall, it's great to prepare for a few different situations in the STAR method for common behavioral questions. But please keep in mind that the interviewer may not give you the opportunity to talk about the 5 different situations you have prepared and you might have to communicate the signals from what you started your interview with. So please start answering with a story that actually has enough substance to cover other questions. Like the conflict you had in this project might not be the best example of conflict management, but that's okay. You can talk about what you learnt about it and leave an opening for the interviewer as to how that helped you manage a conflict a few months later.
System Design This was a funky design question and actually took me a little time to understand. The interviewer wanted me to design a system for a one-time web crawling operation of a magnanimous website which could have any number of sub-links / URLs.
Some interesting constraints:
This question was basically a mix of distributed task scheduling where we run the central processing logic on our servers and farm of smaller tasks to these mobile devices which can access the website to be crawled.
It took me 15 minutes to grasp the question and 15 more to come up with a solution and a little more to wrap up the diagramming part of it. I was able to answer all of the interviewer's questions but ended up being a little short of time.
Onsite Coding Round 2 Both questions you can find in the Meta / Facebook tagged questions. Not mentioning to avoid traceability back to me since I signed NDA for interview.
I messed up the second question. The interviewer was very strict about only wanting to see the optimized approach and I was unable to wrap up the coding for that within the interview time.
Overall I would say that for E5 the bar is pretty high and they have a lot of candidates. Your recruiter may tell you that one botched coding round is okay but that honestly is not true. You might be better of at having 2 strong hire coding rounds and 1 bad coding rounds than 3 average coding rounds (which was my case probably).
I got reached out within 48 hours with the news that it was a reject. No feedback was offerred, just that I had fallen just a little short.