Created
May 1, 2021 13:32
-
-
Save codinko/09f4052e2178a1dbebbabe4d99a4778b to your computer and use it in GitHub Desktop.
LRU Cache Java implementation Using Custom created Double linked List and Hashmap - OUTPUT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jdk1.8.0_231 | |
{1=key = 1 | value = mango | leftValue = mango | rightValue = null} | |
****************************************************** | |
{1=key = 1 | value = mango | leftValue = apple | rightValue = null, | |
2=key = 2 | value = apple | leftValue = null | rightValue = mango} | |
****************************************************** | |
{1=key = 1 | value = mango | leftValue = apple | rightValue = null, | |
2=key = 2 | value = apple | leftValue = orange | rightValue = mango, | |
3=key = 3 | value = orange | leftValue = null | rightValue = apple} | |
****************************************************** | |
{1=key = 1 | value = mango | leftValue = apple | rightValue = null, | |
2=key = 2 | value = apple | leftValue = orange | rightValue = mango, | |
3=key = 3 | value = orange | leftValue = null | rightValue = apple} | |
LRU item is key = 1 | value = mango | leftValue = apple | rightValue = null | |
MRU item is key = 3 | value = orange | leftValue = null | rightValue = apple | |
****************************************************** | |
{4=key = 4 | value = strawberry | leftValue = kiwi | rightValue = null, | |
5=key = 5 | value = kiwi | leftValue = blueberry | rightValue = strawberry, | |
6=key = 6 | value = blueberry | leftValue = null | rightValue = kiwi} | |
LRU item is key = 4 | value = strawberry | leftValue = kiwi | rightValue = null | |
MRU item is key = 6 | value = blueberry | leftValue = null | rightValue = kiwi | |
strawberry | |
Process finished with exit code 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment