# 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

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.

1. You have an array of n elements, and a sum. Check if any 2 elements in the array sum to the given sum. ( Expected time complexity O(n). Use hashing)

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 geeksforgeeks.org

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

## Related Practice Problems

Write your Interview Experience or mail it to contribute@geeksforgeeks.org

My Personal Notes arrow_drop_up