facebook e5 interview questions

Landing a job at Facebook is a dream for many developers around the globe. Facebook is one of the top tech companies in the world, with a workforce of over 52,000 strong. Facebook is known for its growth-based company culture, fast promotion tracks, excellent benefits, and top salaries that few companies can match.

My Facebook Interview Experience (software engineer interview)

Overview of the Facebook coding interview

To land a software engineering job at Facebook, you need to know what lies ahead. The more prepared you are, the more confident you will be. So, let’s break it down.

  • Interview Timeline: From resume submission to job offer, the process lasts 1.5 to 2 months.
  • Types of Interviews: The interview process consists of 6 to 7 interviews. This includes 1 pre-screen interview (20 minutes), 1 technical phone interview (50 minutes, 1-2 coding questions), and 4-5 on-site interviews (45 minutes each).
  • On-site interviews: Facebook breaks the on-site interviews into three sections. The Ninja portion consists of 2 coding interviews using a whiteboard. The Pirate portion includes 2 system design interviews. The Jedi portion includes 1 cultural/behavioral interview.
  • Coding Questions: Facebook interview questions focus on generalist knowledge on algorithms, data structures, and time complexity. They also test on architecture and system design (even entry level).
  • Hiring Levels: Facebook normally hires at level E3 for entry level software roles with E9 behind the height of levels. E5 is considered an entry-level manager role.
  • Hiring Teams: Central hires for Oculus, Facebook Groups, and WhatsApp.
  • Programming languages: Facebook prefers most standard languages, including Java, C++, Python, Ruby, and Perl.
  • Sorting and Searching: Find the high and low index

    Given a sorted array of integers, return the low and high index of the given key. You must return -1 if the indexes are not found.

    In the following example, according to the the key, the low and high indices would be:

  • key: 1, low = 0 and high = 0
  • key: 2, low = 1 and high = 1
  • key: 5, low = 2 and high = 9
  • key: 20, low = 10 and high = 10
  • For the testing of your code, the input array will be:

    Runtime complexity: Logarithmic O(logn)O(log n)O(logn)

    Memory Complexity: Constant, O(1)O(1)O(1)

    Linearly scanning the sorted array for low and high indices are highly inefficient since our array size can be in millions. Instead, we will use a slightly modified binary search to find the low and high indices of a given key. We need to do binary search twice:

  • Once for finding the low index.
  • Once for finding the high index.
  • Let’s look at the algorithm for finding the low index:

  • At every step, consider the array between low and high indices and calculate the mid index.
  • If the element at mid index is less than the key, low becomes mid + 1 (to move towards the start of range).
  • If the element at mid is greater or equal to the key, the high becomes mid - 1. Index at low remains the same.
  • When low is greater than high, low would be pointing to the first occurrence of the key.
  • If the element at low does not match the key, return -1.
  • Similarly, we can find the high index by slightly modifying the above condition:

  • Switch the low index to mid + 1 when the element at mid index is less than or equal to the key.
  • Switch the high index to mid - 1 when the element at mid is greater than the key.
  • Strings: String segmentation

    You are given a dictionary of words and a large input string. You have to find out whether the input string can be completely segmented into the words of a given dictionary. The following example elaborates on the problem further.

    Runtime complexity: Exponential, O(2n)O(2^{n})O(2n), if we only use recursion. With memoization, the runtime complexity of this solution can be improved to be polynomial, O(n2)O(n^{2})O(n2).

    Memory Complexity: Polynomial, O(n2)O(n^{2})O(n2)

    You can solve this problem by segmenting the large string at each possible position to see if the string can be completely segmented to words in the dictionary. If you write the algorithm in steps it will be as follows:

    The algorithm will compute two strings from scratch in each iteration of the loop. Worst case scenario, there would be a recursive call of the second_word each time. This shoots the time complexity up to 2n2^{n}2n.

    You can see that you may be computing the same substring multiple times, even if it doesn’t exist in the dictionary. This redundancy can be fixed by memoization, where you remember which substrings have already been solved.

    To achieve memoization, you can store the second string in a new set each time. This will reduce both time and memory complexities.

    FAQ

    What questions does Facebook ask in an interview?

    Facebook Behavioral Interview Questions on Teamwork and Collaboration
    • How highly do you rate teamwork on a scale of 1 to 10, with 1 being the highest and 10 being the lowest?
    • Do you prefer to work independently?
    • Have you ever been in a challenging team situation? …
    • How did you motivate your team?

    How do I pass a Facebook interview?

    Here are the five most important things you can do to get an offer as a Facebook product manager.
    1. 3.1 Deep dive into the product / organization. …
    2. 3.2 Brush up on product fundamentals. …
    3. 3.3 Learn a consistent method for answering PM interview questions. …
    4. 3.4 Practice by yourself or with peers.

    Are Facebook interview questions hard?

    Facebook (Meta) coding interviews are really challenging. The questions are difficult, specific to Facebook, and cover a wide range of topics. The good news is that the right preparation can make a big difference.

    How many interview rounds does Facebook have?

    On-site interviews usually consist of 4-5 rounds, in which two things will be assessed: (1) Your fit for the selected role (role-specific fit) and (2) Process, teamwork, and culture fit (firm-specific fit).

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *