martes, 13 de diciembre de 2011

LRU

LRU Cache is implemented through the LinkedHashMap class, this holds values with unique key.

Many methods which have been used in the following program are explained as follows.

LinkedHashMap
This class is also used for the implementing the doubly linked list which tracks either insertion or access order.



Map.Entry
Objects are valid only to the duration of the interation.



e.getKey()
Returns the key corresponding to the value.



This entry is for points in second opportunity.

No hay comentarios:

Publicar un comentario