A4 Printable monthly calendar with 18 different templates
{ | |
"basics": { | |
"name": "Anand R", | |
"label": "Sr. Staff Software Engineer", | |
"email": "[email protected]", | |
"phone": "(408) 212-0297", | |
"url": "https://rathnas.com", | |
"location": { | |
"city": "San Ramon", | |
"region": "CA", |
Use replit for collab and design a data structure that follows the constraints of a Least Recently Used (LRU) cache
.
Discards the least recently used items first
. This algorithm requires keeping track of what was used when, which is expensive if one wants to make sure the algorithm always discards the least recently used item. General implementations of this technique require keeping age bits
for cache-lines and track the Least Recently Used
cache-line based on age-bits. In such an implementation, every time a cache-line is used, the age of all other cache-lines change. The access sequence for the below example is A B C D E D F.
In the example once A B C D gets installed in the blocks with sequence numbers (Increment 1 for each new Access) and when E is accessed, it is a miss and it needs to be installed in one of the blocks. According to the LRU Algorithm, since A has the