Reputation: 170
Was just asked this day before.
Could come up with -
1. Arrays
2. Linked Lists
3. Sets/Vectors
4. Min/Max heaps
5. Trees
6. Map
Interviewer said I haven't included one obvious answer which is as good, if not better than trees (assuming, they are balanced). Any ideas?
Upvotes: 1
Views: 80
Reputation: 46389
There are lots of options that can be added. Skip list, graph, btree, log-structured merge-tree, bloom filter...
I consider that a horrible interview question. The interviewer is asking for useless trivia, and believes that how much trivia you know in common with the interviewer is a measure of something useful. Speaking personally, I'd consider that a red flag that would limit my interest in the company.
Upvotes: 1