[Java] Leetcode 146. LRU Cache [Design #1]

  Рет қаралды 4,186

Eric Programming

Eric Programming

3 жыл бұрын

In this video, I'm going to show you how to solve Leetcode 146. LRU Cache which is related to Design.
In fact, I also have a whole section of solving leetcode questions and categorize them: kzbin.info...
In the end, you’ll have a really good understanding on how to solve Leetcode 146. LRU Cache and questions that are similar to this Design.
Now, if you want to get good at Design, please checkout my Design playlist.
• Leetcode: Design

Пікірлер: 10
@horcruxone
@horcruxone 4 ай бұрын
Great work! Thanks!
@AmyZahirski673
@AmyZahirski673 3 жыл бұрын
Dude that was just superb, great job. Can you do Integer to English Words on leetcode?
@maud9112
@maud9112 3 жыл бұрын
What is the difference for implementing LRU for 4-way set associate? Is there any code for that?
@TahliaYeseniaJones
@TahliaYeseniaJones 3 жыл бұрын
LOL! I did it with heaps and hashing, which is of more time complexity and takes more code for implementation.
@EricProgramming
@EricProgramming 3 жыл бұрын
I am glad that you like it
@Anna78671
@Anna78671 3 жыл бұрын
There is another method of removing a node whose reference is given, copy the data from the next node and delete the next node. That way you dont even need a doubly linked list
@EricProgramming
@EricProgramming 3 жыл бұрын
That's also a good idea as well
@algorithm69
@algorithm69 8 ай бұрын
What if the element to remove is the last one ? You need to tell the previous one that it's now the last one.
@LaytoyaThomas23
@LaytoyaThomas23 3 жыл бұрын
Can you please explain LFU Cache as well? Thanks
@EricProgramming
@EricProgramming 3 жыл бұрын
Yes Steven, I did.
[Java] Leetcode 380. Insert Delete GetRandom O(1) [Design #2]
10:46
Eric Programming
Рет қаралды 3,2 М.
LeetCode 146. LRU Cache (Algorithm Explained)
18:00
Nick White
Рет қаралды 116 М.
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 9 МЛН
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 26 МЛН
World’s Largest Jello Pool
01:00
Mark Rober
Рет қаралды 110 МЛН
LRU Cache -  Explanation, Java Implementation and Demo
23:41
Bhrigu Srivastava
Рет қаралды 16 М.
LeetCode 460. LFU Cache 中文解释 Chinese Version
30:11
happygirlzt
Рет қаралды 3,5 М.
LRU Cache - Twitch Interview Question - Leetcode 146
17:49
NeetCode
Рет қаралды 253 М.
5 Steps to Problem Solve Coding Interview Questions
14:10
Eric Programming
Рет қаралды 3,5 М.
Imlement LFU Cache | Leetcode(Hard)
19:27
take U forward
Рет қаралды 113 М.
Leetcode 460 LFU Cache Easy Peasy | SDE Sheet below
17:44
Coding Decoded
Рет қаралды 2,3 М.
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 9 МЛН