Facebook Interview Report
- 1of 1 vote
AnswersGiven a set of n people, find the celebrity.
- JSDUDE January 16, 2015 in United States
Celebrity is a person who:
1. Knows only himself and no one else
2. Every one else knows this person
You are given the following helper function:
bool knows(i, j);
Returns:
True: If i knows j
False: otherwise
I proposed the O(n2) algorithm at first but he wanted me to improve on it. He wanted an O(n) algorithm| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer - 2of 2 votes
AnswersGiven a 4 X 4 game slot that has random alphabets in all the slots
- JSDUDE January 16, 2015 in United States
Write a function that takes the keyboard and the word as input and returns true if the word can be formed
False otherwise.
A word can be formed on the board by connecting alphabets adjacent to each other (horizontal, vertical and diagonally)
Same alphabet should not be reused.| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Algorithm - 0of 0 votes
AnswersYou have a list of words with ranking.
- JSDUDE January 16, 2015 in United States
Now you need to create a function that will take this list as input and provide a way so that a T9 keyboard can provide three top results of probable words based on rankings for the numbers punched in.| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Algorithm - 0of 0 votes
AnswersDesign a URL system.
- JSDUDE January 16, 2015 in United States
He even wanted to know what kind of algorithm to use, improve the speed, availability etc.| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer System Design