Facebook Interview | Set 2 (On Campus for Internship)

Recently facebook visited our campus. There was an online round first. 7 people were shortlisted for the telephonic interviews. And then there were 2 telephonic interviews taken by people from the US.

2. You are given the encoding for a base 58 number. You have to convert all the numbers from 1 to n to a base 58 number using the encoding given.

The questions were not difficult, and the shortlisting basis was very strange. My friend finished much before me, but he was not shortlisted. I think they looked at your CV and projects.

1st telephonic round
Introduce yourself and tell me about your projects. Then he asked me 2 algorithmic questions.

1. You are given the start time and finish time of n intervals. You have to write a a function that returns boolean value indicating if there was any overlapping interval in the set of existing intervals. (Sort and check, time complexity O(nlogn))

2. You have 2 sparse vectors (large number of 0’s). First tell me a way to represent and store them, and then find the dot product.
(To store them, we should store the value and index of those indexes that have a non-zero value, and then finding the dot product is very straight forward).

2nd telephonic round
The interviewer was not the same. Introduce yourself and tell me about your projects. Even he asked me 2 algorithmic question.

A few pointers:

  • Always explain what you’re doing and why.
  • First explain the algorithm and then start coding.
  • If he gives a hint, take it and use it.

Thanks w3wiki.net

All Practice Problems for Facebook !

Related Practice Problems