Interview Questions

How these DS stored in memory?

Software QA/Tests Interview Questions from Microsoft


(Continued from previous question...)

How these DS stored in memory?

Question:
How these DS stored in memory?
Hashtables, Dictionary, Trees, Arrays, LinkLists


maybe an answer:


Hashtables : 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.


In memory data is stored only in two ways. Array or link list. Depends on you whether you want for eg a stack to be array or linked list.
Dictionary is any DS on which certain operations can be done. So it can be array or list.

(Continued on next question...)

Other Interview Questions