Pinterest Interview Question
Software Engineer InternsCountry: United States
Interview Type: In-Person
Create a hash table where keys are people's names. Inside the hash table, have a heap structure where each node in heap is a persons name and the likelihoods of that person being a friend.
Given a name, lookup hash table entry and pick the top 5 items in heap.
Some questions to follow
- DashDash April 30, 20131) "Knowing a value between 0 and 1 for every one of them" What does this mean? Can you please give example.
2) How do you rank people i.e top 5 ?