|
|
|
|
|
by asmdsr
6244 days ago
|
|
"What will you do in the event of hash collisions?" the professor asked. The interviewer was priming for this particular answer: Keep the buckets in a linked list. Each time you increment a bucket, move it to the front of the list. When you're counting frequencies, this approach will mean that the most frequently occurring keys will be closer to the front of the list. I know this because I was asked a similar question in an interview with a certain well-known PC software company. I didn't know the answer either, but still got an offer. |
|