pqrabcd
BAN USER
Questions (2)
Reputation 380
- 0of 0 votes
AnswersIn gmail, while composing an email, upon adding a contact, related contacts are displayed. How would you implement that feature?
- pqrabcd in United States
- Write an algorithm for that.
- What data structure would you use to store the weights?
- In what format would you persist this data?| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer - 5of 5 votes
AnswersWe have words and there positions in a paragraph in sorted order. Write an algorithm to find the least distance for a given 3 words.
- pqrabcd in United States
eg. for 3 words
job: 5, 9 , 17
in: 4, 13, 18
google: 8, 19, 21
...
...
Answer: 17, 18, 19
Can you extend it to "n" words?
Context: In Google search results, the search terms are highlighted in the short paragraph that shows up. We need to find the shortest sentence that has all the words if we have word positions as mentioned above.| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Algorithm
Page:
1
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.