Amazon Interview Question
Software Engineer / DevelopersDepends on collision resolution strategy. If open addressing, then array of nodes. If separate chaining with list, then array of list. If Separate chaining with other structures like bst, then array of trees
hey algorithmist, collision resolution comes after first building the hashtable. First for building the hashtable only array will be used. So, if collision occurs then we can use list or tree to traverse the different values for the same key, but still the slot will be only in the array..
Algorithmist is right. When u try to figure out what data structure you use, you need to know what you want to do with it. It shows the interviewer that you really know the stuff and have not just scratched the surface. With Anonymous' answer you leave the interviewed open to 10 different questions after that.
i feel that it will be implemented using an array..
- unknown June 11, 2011