Facebook Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

I cannot finish the question, you can check(remove the '/' among 'w')
/w/w/w.careertea.com/techforum/post.aspx?PostID=37

- Anonymous January 05, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Assign a unique prime to every character. For each word, find the product of the primes in the word and put them in a hash table as you generate them. Duplicates are anagrams.

- Anonymous September 23, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Could some one please write the solution to 2nd question.

- rn July 24, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

A hash table may reduce to amortise O(nk), which n is the number of words and k is the length of words, with space O(nk)

- nanny October 28, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

For the 2nd question,
Just sort each word separately, and find the duplicates (sort collection and find equal neighbor elements)

The rat fell in the tar -> eht art efll in eht art - > art art efll eht eht in

- madi.sagimbekov June 26, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1. run a loop to read each word in the sentence
2. Sort the word and add into the Trie, ( Augment the trie data structure at leaf, with a count variable)
3. After adding the working increment this count variable ;
4. Keep on reading the words and adding in Trie. If you find the count variable as 1 then it means this word is an anagram

- vivekh August 05, 2015 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More