Regarding the speed vs memory occupation, there should be comparison between linkedlist vs. hashmap. I remember that linkedlist is faster. So it depends on the language support.
You can google it more. I don't have time to find out about the Big O footprint for both now. Here is one link discussing about it:
Linear lists are.... linear. Hash maps are constant access. N doesn't need to get very large to see orders of magnitude difference—one you'll certainly see if you switch on level0.
You can google it more. I don't have time to find out about the Big O footprint for both now. Here is one link discussing about it:
http://stackoverflow.com/questions/7975802/when-to-use-hashm...