How does OrderedDict
in Python remember all the order of the elements? What is the performance overhead? For problems like implementing LRU
, I found this really powerful and very simple to implement, but what is the performance gain here? How does it remember the order of the keys that were first inserted?
Does it use a Dict()
and Double Linked List
for remembering the keys as shown in the below picture? I will really appreciate if you could convey your message in a simple language rather than sharing some kind of a research paper.