(This question has been seen in the interviews of the following companies: Facebook)
Facebook On-site
1st Round:
Behavioral + longest consecutive sequence.
Can be solved with map in O(n) time.
2nd Round:
Question: Given an integer array, output all combinations of cell phone texting letters with the given numbers.
DFS solves the problem. So does BFS.
Follow-up: Check whether the given text matches with a given integer array.
Solution: Check whether the lengths match at the first traversal. Then reverse-map the text with the number.
3rd Round:
Question: Design a status post system that supports status store and search on statuses that has a string or multiple strings in them.
4th Round:
Question: LRU cache.
The whole whiteboard was filled by my codes….Afterwards the interviewer asked two questions about high level design.
5th Round:
Question: Behavioral + move zeros with minimum writes.
I went with index insertion but not sure if this gives minimum writes.
Get one-to-one training from Google Facebook engineers
Top-notch Professionals
Learn from Facebook and Google senior engineers interviewed 100+ candidates.
Most recent interview questions and system design topics gathered from aonecode alumnus.
One-to-one online classes. Get feedbacks from real interviewers.
Customized Private Class
Already a coding expert? - Advance straight to hard interview topics of your interest.
New to the ground? - Develop basic coding skills with your own designated mentor.
Days before interview? - Focus on most important problems in target company question bank.