Mr. Dan Chisholm, in the mock exam
Dan Chisholm explains that LinkedHashMap organizes elements according to the hash method but also maintains order of insertion with a linked list. Please explain the implementation details of LinkedHashMap. I am thinking that it can either have a list based on the hashcode or a list based on order of insertion, but how can an implementation guarntee both properties concurrently? I think they would probably use two linked lists to get the desired behavior from LinkedHashMap. How do you think Sun implemented LinkedHashMap? Is it possible to have one linked list which keeps track of hash buckets and order of insertion or do we need two linked lists?
