📌 Facebook | E5 | Bay Area | Virtual Onsite

facebook logo
facebook
software engineer e5bay areaOngoing
March 6, 20213 reads

Summary

I recently completed a virtual onsite interview for an E5 Software Engineer role at Facebook in the Bay Area, which consisted of two coding rounds, one system design round, and a behavioral round that also included a small coding problem.

Full Experience

I recently had a virtual onsite interview with Facebook for an E5 Software Engineer role in the Bay Area. The process involved four 45-minute rounds: two focused on coding, one on system design, and a behavioral round which surprisingly also included a small coding problem.

1st Coding Interview

The first coding round started with a problem similar to Intersection of Two Linked Lists, but presented in the context of a binary tree. I was asked to find the Lowest Common Ancestor (LCA) of two nodes in a binary tree, where each node only had a parent pointer. Initially, it took me a moment to connect it to the linked list intersection concept, but I eventually figured it out without any hints. I implemented a two-pointer solution in Java, achieving O(n) time complexity and O(1) space complexity. After walking through my code with a few examples, the interviewer seemed pleased. We then moved to a second coding question: Leftmost Column with at Least a One, which was identical to the problem found on LeetCode. I provided an optimal solution for this as well.

2nd Coding Round

In my second coding round, I tackled two problems. The first was Range Sum of BST, and the second was Trapping Rain Water. Both were exactly as they appear on LeetCode. I developed optimal solutions in Java for both. For the first question, the interviewer requested a few examples and base cases to test my solution. Unfortunately, we ran out of time before I could thoroughly walk through the solution for the second problem.

System Design Interview

The system design interview challenged me to design a Proximity Server. The core requirement was to, given a location's latitude and longitude, find all nearby places within a specified radius. I began by clarifying the essential features and discussing the design goals and potential scale. I then outlined a high-level design of the APIs. A significant portion of my discussion focused on the data structures and algorithms for efficiently finding nearby places; I proposed using a Quad Tree to represent geographical grids and store locations. I also delved into sharding strategies, briefly explaining Consistent Hashing, and the importance of caching for quick data retrieval. Additionally, I touched upon the application layer, mentioning stateless machines and load balancers. I later found a helpful video on this topic here.

Behavior Round

The behavioral round primarily centered on my projects at my current company. The interviewer also posed questions related to conflict resolution, how I've made an impact outside my immediate team, and my approach to problem-solving when faced with limited information. For each of these, I drew upon my past experiences to provide concrete examples. Towards the end, a simple coding problem was introduced: Valid Palindrome. I believe I performed well in this round, effectively communicating my experiences and solving the coding challenge.

Overall, I feel the interview went quite well. I've received an email from the recruiter indicating that it might take up to a week to hear back about the result. So, I'm keeping my fingers crossed!

Interview Questions (7)

Q1
Lowest Common Ancestor of Binary Tree with Parent Pointer
Data Structures & AlgorithmsMedium

Given two nodes in a binary tree, find their lowest common ancestor. Each node has a parent pointer. This is similar to LeetCode's Intersection of Two Linked Lists or Lowest Common Ancestor of a Binary Tree Part III.

Q2
Leftmost Column with at Least a One
Data Structures & AlgorithmsMedium

Given a row-sorted binary matrix, return the index of the leftmost column that contains at least one 1. You can only access the matrix using a special BinaryMatrix interface.

Q3
Range Sum of BST
Data Structures & AlgorithmsEasy

Given the root of a binary search tree and two integers low and high, return the sum of all node values v such that low <= v <= high.

Q4
Trapping Rain Water
Data Structures & AlgorithmsHard

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.

Q5
Design a Proximity Server
System Design

Design a system that, given the latitude and longitude of a location, can find all nearby places within a given radius.

Q6
Behavioral Questions: Project Impact, Conflict Resolution, and Problem Solving
Behavioral

Questions covered my projects at my current company, conflict resolution, demonstrating impact outside the team, and approaching problems with limited information.

Q7
Valid Palindrome
Data Structures & AlgorithmsEasy

Given a string s, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.

Preparation Tips

My preparation journey was significantly aided by the LeetCode Community. Their support and resources over the past few months were invaluable in honing my skills. For a more detailed breakdown of my strategy, I've shared my full interview preparation journey here.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!