LRU Cache Implementation | Codewise explanation using Queue & Map | Java Code

Pubblicato il: 01 aprile 2020
sul canale di: Coding Simplified
9,057
127

Source Code:https://thecodingsimplified.com/lru-c...
Solution:
We implement lru cache using queue & map
Map helps us to fetch data faster
While pushing value in cache if data is already in cache, we move it to top & update the value. If cache is full, we remove data from last
While getting the data, we move accessed data to top of queue.

Time Complexity: O(1)
Space Complexity: O(n)

Do Watch video for more info

CHECK OUT CODING SIMPLIFIED
   / codingsimplified  

★☆★ VIEW THE BLOG POST: ★☆★
http://thecodingsimplified.com

I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 400+ videos.

★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★
https://www.youtube.com/codingsimplif...

★☆★ Send us mail at: ★☆★
Email: thecodingsimplified@gmail.com


In questa pagina del sito puoi guardare il video online LRU Cache Implementation | Codewise explanation using Queue & Map | Java Code della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Coding Simplified 01 aprile 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 9,057 volte e gli è piaciuto 127 spettatori. Buona visione!