Preparing for an interview? Check out Cracking the Coding Interview
Published on

Meta | E6 | Virtual Onsite | Offer

Author
  • Shared Anonymously

Hello Everybody!

This is a continuation from my phone screen round (link below). I prepared for additional 3 months for my full loop consisting of 2 DSA, 1 Behavioral, and 3 Product Architecture System Design rounds, with each round lasting 45 minutes.

Phone screen: https://leetcode.com/discuss/interview-question/5186378/meta-e6-phone-screen/2414912

Full loop

Day 1: 2 DSA + 1 Behavioral

  • Round 1

Interviewer joined the call on time and right away said he'd provide me 5 mins extra time - I quickly inferred there was going to be a hard question for sure.

Question 1: Medium
https://leetcode.com/problems/binary-tree-right-side-view
Interviewer provided the sample input and output, and given a description of the question in plain text without explicitly spelling out binary tree right side view.

I discussed the recursive dfs solution providing the time O(n) and space O(n) solution. Discussed the trade-off of this solution with iterative approach. Mentioned that recursive solution is short implementation so I'd go with it. Interview was satisfied. I coded it quickly. Did a dry-run on the input provided by interviewer and re-iterated the time and space complexities.

Once that's finished, Interviewer jumped to the second problem.

Question 2: Hard
https://leetcode.com/problems/making-a-large-island/
Interviewer provided a sample example with the problem description.

I re-iterated my understanding and walked through a brute-force solution in which we compute the area when encountering a 0. we repeate the process while traversing the grid. This involves repeated computation. I then provided the optimal solution in which we tag the areas and save them in hashamp so that we can use it efficiently while computing the max area. Provided the time and space complexity. Interviewer was satisfied with this solution. I coded the solution and dry-ran the input given by interviewer.

I finished the round within 35 mins. Interviewer said he was done with the interview. We discussed about work culture at Meta etc for 2~3 mins and then ended the call.

  • Round 2

Interviewer joined the call 5 mins late and proceeded to the questions rightaway.

Question 1: Medium
Modified version of below
https://leetcode.com/problems/find-largest-value-in-each-tree-row
Instead of largest value, interview asked to find the smallest values in each tree row.

I modified the solution of Q1 in round 1.
I discussed the recursive dfs solution providing the time O(n) and space O(n) solution. I mentioned that recursive solution is short implementation so I'd go with it. Interview was satisfied. I coded it quickly. Did a dry-run on the input provided by interviewer and re-iterated the time and space complexities.

Follow up 1: what if there is limited stack space but you have unlimited heap?
Answer: Switch to iterative solution. In this case recursive solution suffers badly when the tree is very very large and skewed. The recursive function calls will eat up the stack pretty quickly. Interviewer was satisfied with the explanation

Follow up 2: Let's assume that each level of the tree has one famous personality. I'd call the API getFamousPerson(int level) billion times. How would you modify your algorithm to handle this scenario?
Answer: I'd cache the answer. I'd run my algotihm and compute the famous personalities at each level once. Then based on the level info in the getFamousPerson() API, I'd simmply fetch the famous person in O(1) time. Interviewer was satisfied with the explanation.

Once that's finished, Interviewer jumped to the second problem.

Question 2: Medium
Given a list of k sorted lists, with total n elements. Implement an iterator on this data structure. Basically, I was asked to implement hasNext() and next() methods on the list of list so that next() would always return the next minimum value in the whole dataset.

Example -
{
{1, 9, 10}
{4, 7}
{2}
}

Each next() will return - {1, 2, 4, 7, 9, 10} - in this order.

I re-iterated my understanding and provided an optimized solution rightaway - the priorityqueue based approach. we store the tuple (index of the list (say i), index j pointing elements within list i). we will have min-heap implementation so the top element is always minimum of the dataset. Something like below -

List<List<Integer>> list;  
PriorityQueue<int[]> pq;  
pq = new PriorityQueue<>((a, b) -> list.get(a[0]).get(a[1]) - list.get(b[0]).get(b[1]));  

I explained the time complexity O(n log k), while space complexity is O(k). The minheap maintains a size of k. Interviewer was satisfied with this solution. I coded the solution and dry-ran the input given by interviewer.

we were right on-time with 5 mins remining in the interview. We chatted about work culture at Meta and finished the interview.

  • Round 3

Interviewer joined the call 2~3 mins late and explained that this was going to be a behavioral round to gauge several characteristics etc..
The questions were very informal - NOT in the typical "tell me a time..." format that I expected. I was stumped.
Tell me what you discuss in your meetings?

However, since I prepared the typical "tell me a time..." questions well, I could form my answers to those informal questions on the spot.

After this interview was over, I had mixed feelings. Unlike othe rounds, I thought it did not go well.

Day 2: 3 Product Architecture Syetem Design

  • Round 4

Interviewer joined the call on time and exchanged the initial pleasantries, then proceeded to the question.

you have to design a simple version of Instagram in which user can upload an image. Assume you have the follow() API already in-place. User can see the feeds of other users he/say follows.
It's toned down version of Instagram News Feed. I prepared Facebook NewsFeed well before.
I re-iterated my understanding and proceeded with Functional, Non-Functional, Core Entities, APIs, HLD, Deep Dive.
I drove the whole interview at ease, going really deep in 2 places during my deep dive - uploading the images directly to bloblstore, feed generation. I provided the justification and trade-offs during my decision making.
I felt really happy after this round, with my confidence really high up.

  • Round 5

Interviewer joined the call on time and exchanged the initial pleasantries, then proceeded to the question.

you have to design a simple version of Drpbox with 2 features - share a file and sync feature across multiple devices. Again luck played its part. I prepared dropbox design pretty well.
I re-iterated my understanding and proceeded with Functional, Non-Functional, Core Entities, APIs, HLD, Deep Dive.
I drove the whole interview at ease, going really deep in 2 places during my deep dive.

  1. uploading/downloading files directly to/from bloblstore, providing my justification for doing so with some calculation and logical thinking.
  2. clearly explaining sync feature -- remote changed and local changed. How to go about in these two scenarios.
    I felt really happy after this round, with my confidence really high up.

Even thouugh I drove the whole interview, I encountered many many follow-ups during the session. At the end of the interview, the interviewer remarked that it was a pretty good design.

  • Round 6

It was a round with shadow interviewer i.e. 2 interviewer joined the party. The recruiter previously mentioned that this round would not be evaulated and that this was just for training purpose.
you have to design an Auction system - bummer. I did not prepare it at all.
I reiterated my understanding and proceeded with Functional, Non-Functional, Core Entities, APIs, HLD, Deep Dive.
I just somehow finished this round.

If I were to rate myself in these 6 rounds, I'd rate as below -
Round 1: Strong Hire
Round 2: Strong Hire
Round 3: Hire/ Lean Hire
Round 4: Strong Hire
Round 5: Strong Hire
Round 6: No Hire

Two days after going through the rounds, I received the feedback from the recruiter that I'd be moving to team matching, congratulations!

A big shout out to the community. The community really helped me throughout my preparation.

Thank you

ReportMark as Helpful