Interviewed with facebook a while ago and had a pretty weird experience. Was asked to design a type ahead suggestion for google search. It was a product design interview , not system design. Came up with a trie, computed via map reduce periodically over 1 hour(configurable), frontend implementation, load balancer, app servers, mq, cache and a key value db. Took the assumption that we would only be interested in popular terms for type ahead and there would be a lot of duplicates in 5 billion odd queries that Google would get everyday. Had thought about this question before and seen it on grokking the system design. Interviewer: But google doesn't only do it for popular terms it does typeahead for all terms Me: No it doesn't. Only the popular terms are what show up on type ahead, otherwise, it'd defeat the purpose. Interview: I'm sure google does typeahead for all terms. Me. So you are saying that if a single random bloke entered the term 'xyzowkdyzxc' on google, and another random bloke entered the term xyz google will show a typeahead suggestion? Interviewer: Yes it will Me: *completely in disbelief at this point , points out the daily query volume for google and space requirements for storing the entire trie* Interviewer: Okay , do it for youtube. Youtube shows typeahead for all of it's videos. Me: It doesn't, based on my experience. But I'll try to solve it anyway. Interview: It does, I have tried it. I just went on to add more fanout nodes to the map reduce output jobs , reduced cassandra's replication factor , added more message queue nodes etc. Follow up: How will the system scale if map reduce job ran every minute? I think the interview went even more downhill after that. People of blind, how do you solve a question like this and what would you do in this sort of a situation?
Not sure if you noticed but sometimes interviewers are less knowledgeable than the candidates they are interviewing.
It's Google and YouTube, pull out phone or laptop to prove them wrong.
Hard to do that in the middle of an interview. I wanted to avoid more confrontation since I thought that I had already been a bit confrontational and just decided to cook up a solution anyway.
Would make this known to your recruiter. Maybe get a redo interview if this one went badly. Maybe even get that interviewer retrained.
Google does type ahead for random queries too. Try it. May be not completely random, but definitely on unpopular queries.
You can do it with client side trie as well. May be there is a relation between what the user searches in the past and future.
But definitely not on *all* queries. The amount of typeahead suggestions that you get in the search box is minuscule compared to the results.
How about a simple sentence or word completion solution along with the popular search query completion solution you proposed. I guess the interviewer was looking for how you would solve or partially solve for an unrealistic requirement.
I was able to solve it, I think. Clients would only request the trie to a short depth of 2-3 characters and fetch the subsequent trie after a few characters had been entered. On the server side, reads were behind a cache and I chose cassandra for random reads and ability to sustain high writes. Map reduce, fan out nodes , cache and cassandra are horizontally scaleable anyway.
OP is an idiot, and embellishing the interview experience here to make himself look like a victim. Rephrase the interviewer's remarks as "Humor me and assume it does search all terms. How might we implement this?" And give your damn answer. Don't try to be a smartass.
I truly wish that this was the case. I did go on to humor him and I did implement a design assuming that it did search all terms. But given that the interview was product design, my first reaction was to argue if it even made sense for the product. Had the question been phrased as 'humor me' , why would I have a problem implementing it given that I did do it later anyway? If someone tells me that my assumption about typeahead not accounting for all queries is wrong, then isn't it my job to justify my assumption?
When do you get system design and when you get product design in interviews? Is it some special track in FB?
Why would you argue? Part of the interview process is seeing whether you work well with other people, and you showed your condescending side to your interviewer during that short time. They will definitely mark you down as someone that they don't want to work with. Understand that the interviewers sometimes just want to extend the requirements or have a technical conversation with you. It doesn't matter that Google doesn't behave the way the interviewer say it is. This is an imaginary problem so they can create an imaginary requirement if they want.
Because I was questioned about my assumption for google only accounting for popular queries and told I was wrong. I had to defend my assumption. Also since it was product design I figured that it made sense. I could have just rolled on but that would have meant that I accepted that my initial assumption, on which I based my solution, was wrong. There was no easy way out for me in this. If it was phrased as a new requirement or a hypothetical use case, I would have switched without trying to defend myself.
If you appear rude and condescending, the interviewer will turn confrontational as well. Learn your lesson.
Op, I think most of the advices here and arguments that you should play by interviewer are wrong. Every time I go to an interview itâs a two way conversation. I get to see how they interview and who they are along with showing who I am. I would personally consider not joining a company / team with an employee who cannot understand simple reasoning or to hide his mistake will continue to insist he was right all along. Also if the rest of the interviewers donât recognize him as an asshole and donât discard his mistake more reason not to join. Could you do better? I donât think so. Based on your description you were reasonable and went well beyond a reasonable request. I personally would decide to hire if that happened in my loop.
Thank you. This is very encouraging.
Why would you identify yourself and break your NDA for something as trivial as this? What a dumb way to get blacklisted lmfao.
2024 Tax
Yesterday
2634
Bidenâs new tax proposal is wild
2024 Presidential Election
Yesterday
1511
Biden ruined America and tech! Tax plans are insane
Tech Industry
Yesterday
6159
Google doing more layoffs, restructuring including country moves
Tech Industry
Yesterday
384
Chances of meta clearing E5 with screwing up one coding one round and acing all other
India
Yesterday
1670
Lost respect for Modiji
I think the interview went well if you did not sound condescending and were collaborative.
I might have been a bit condescending to the interviewer. Honestly, it was hard to not let out a chuckle given the unrealistic requirements. Though I did try to be patient.
OP is an idiot, and embellishing the interview experience here to make himself look like a victim. Rephrase the interviewer's remarks as "Humor me and assume it does search all terms. How might we implement this?" And give your damn answer. Don't try to be a smartass.