May 6, 2021
Introduction
It is so important for me to work on my research. How to advance myself in terms of algorithm and data structure problem solving? How to work on system design preparation? Here is the post I came cross today.
Here are highlights:
- Try to find optimal time and also optimal space solution.
📌 Facebook | E5 | Bay Area | Virtual Onsite
Last Edit: April 15, 2021 3:21 AM
11.6K VIEWS
There were 4 rounds in total. 2 Coding, 1 System Design, and 1 Behavior which also involved a small coding problem. Each round was 45 minutes long.
In the 1st coding interview, I was asked a question similar to Intersection of Two Linked Lists. However, it was worded differently. Interviewer asked me to find the Lowest Common Ancestor of two nodes in a binary tree where the nodes only have a parent pointer. It took me some time to understand that this question is similar to Intersection of Two Linked Lists, but I was able to figure it out without any hints from the interviewer. I wrote the two-pointer solution in Java which had a time complexity of O(n) and space complexity of O(1). Then, I went through my code with some examples. She was happy with it, and we moved onto the next coding question. She asked me Leftmost Column with at Least a One, and it was the same as the one on Leetcode.
In the 2nd coding round, I was asked two questions - Range Sum of BST and Trapping Rain Water. Both of them were the same as the ones on Leetcode. I wrote optimal solutions in Java. Interviewer asked me for a few examples and base cases to test for the first question. However, we did not had much time remaining to walk through the solution for the second problem.
Next was the system design interview. Here, I was asked to Design a Proximity Server. Given the latitude and longitude of a location, find all the nearby places within a given radius. First, I discussed and clarified all the key features required to be designed in the interview. Then, I spent around 5-10 mins on design goals and scale estimations. I provided a high-level design of the APIs that I will be developing. Next, I focused a lot on the actual data structure and algorithm to find the nearby places. I used the Quad Tree solution to represent the grids in the world and store the places. I also focused on sharding where I explained a little bit on Consistent Hashing, and caching for fast retrieval. I also briefly explained the application layer consisting of stateless machines and the load balancer. I also found a solution to this question in this video - https://youtu.be/Hq8pZ8G2Lm8
In the Behavior Round, interviewer focused majorly on my projects at my current company. He also asked questions related to conflict resolution, impact outside the team, and on how to tackle a problem when the engineer has no information available to them. He also asked a simple coding problem which was Valid Palindrome. I think I did well in this round. I gave examples for each of the questions from my experience.
I think the overall interview went well. I got an email from the recruiter that it may take up to a week to know the result. So, fingers crossed 🤞
I want to thank the LeetCode Community for all the help and support in the last few months. It really helped a lot 🙂
Edit 1:
The Coding Question in the 1st round is also similiar to Lowest Common Ancestor of a Binary Tree Part III. Thanks @rocky1990 for this additonal detail.
Edit 2:
Phone Screen: https://leetcode.com/discuss/interview-experience/1107713/Facebook-or-E5-or-Bay-Area-or-Phone-Screen
Offer Details: https://leetcode.com/discuss/compensation/1118731/facebook-software-engineer-e5-bay-area-offer-march-2021
Interview Preparation Strategy: https://leetcode.com/discuss/interview-experience/1129797/facebook-e5-interview-preparation-journeystrategy-offer-accepted
No comments:
Post a Comment