Microsoft Interview Question
Software Engineer in TestsFrom my perspective the right answer here is that Hashtables and Arrays can only be based on continues memory block (Even in case of chaining collision resolution in Hashtables heads of lists are stored in an array).
While Dictionaries, Trees and Linked Lists CAN be implemented using both Arrays (continues memory) (which is not usual case) and fragmented memory (usual case).
Comments?
I think
- Messi September 09, 2010Hashtables : array of objects
Dictionary : array of keys and array of values(both at same indexes)
Trees : array of nodes with pointers to left and right children.
Arrays : array :-)
Linklists : array of addresses to objects.