Pregunta de entrevista de Lookout

Explain how the following two data structures work, and their pros and cons. 1) Hash table 2) Linked List (Unordered) bonus question (ugh): Why would you ever use a Unordered Linked List for storage of items?

Respuestas de entrevistas

Anónimo

22 may 2013

Hash table: O(1) access, insert Linked List:O(n) access, O(1) insert

Anónimo

15 abr 2015

As for the bonus question: If you want to keep multiple instances of the same object then HashTable won't do - two identical objects will most likely have the same key and therefore the second instance will override the first in its HashTable location.