LRU Cache | (C++, Java, Python) |30 day Challenge | Day 24 | LeetCode #146

preview_player
Показать описание

**** Best Books For Data Structures & Algorithms for Interviews:**********
*****************************************************************************

LeetCode 30 day Challenge | Problem 24 | LRU Cache | 24 April,
Facebook Coding Interview question,
google coding interview question,
leetcode,
lru cache python,
lru cache java,
lru cache c++,

#Facebook #CodingInterview #LeetCode #30DayChallenge #Google #LRU #Amazon
Рекомендации по теме
Комментарии
Автор

Share your interview experience. If it was asked to you in any programming interview?

KnowledgeCenter
Автор

Best solution to this problem till now. This was asked in Goldman Sachs last technical interview round I couldnt answer it properly

bleakMidWinter
Автор

Fantastic. You go to great depths to put across the underlying concepts of the video. A positive learning experience came out of this lockdown. Thank you for this !!

revanthvenkateswar
Автор

Best video explanation of LRU Cache, short and clear!!!

gokulnaathbaskar
Автор

Your explanations are very clear and very easy to follow. You have impressive programming knowledge. Thanks for posting your videos.

jimwoodward
Автор

Hi,
if .keySet().iterator().next() is pointing to the first key of the LinkedHashMap, how do I point to the last key?
And also, why do we remove the first key when the first is the most-recently-used, or isn't it?
Thank you!

tomasmachacek
Автор

In Java
To find out the initially inserted element is that the only way or is there an alternate way?

f-faithfitnessfinance
Автор

Can you please make a video on the TTL variant of the same problem? Thanks!

siddarthvaranasi
Автор

Thanks for the video! Referring to the C++ solution, it is accepted in Leetcode, however, the worst case time complexity of unordered_map's erase function is linear. So wouldn't that make the worst case of this algorithm O(n)?

techspiritzz
Автор

Could you plz make a video for the LFU, leetcode 460?

monojit
Автор

waiting for the video from the morning

rishikeshkumarsingh
Автор

One question I have for C++ implementation, for maintaining the order of [key, value] pair why you didn't use the Ordered Map ( map<key, value> ) ? Please clear this doubt.

shubhamsood
Автор

I have doubt when 1 was added 2nd time after that why it's not put in cache when it was not present there.

anonymous_upsc_asprnt
Автор

Why can't we use deque instead of list in c++? Using deque gives an error. Please REPLY.

tarunsingh
Автор

sir, I have a question.
Is that erase operation in list O(1) or O(n), since it need to traverse through the linked list to find the element to be deleted?

elrey
Автор

Nice video, can u make a series of important questions asked by companies

AshokKumar-swoc
Автор

does anyone else get TLE for c++ code submitted recently ?

arpanpandey
Автор

Awesome playlist... thanks for this...

I have a question on C++ implementation of get function.How it gets compiled is making me confused..

keys.erase will need iterator of list as keys is of type list.
But you are passing _map[key].second
Isn't this a pair of int and list iterator?

ketanlalcheta
Автор

sir a strange question, actually i was wondering if people does this kind of questions at one go ? bcz i couldn think it ... i had to watch vedio for most of the standard questions .

riteshsrivastava
Автор

Awssom video sir. When I'm using keys.end()then it's giving compile error. So what's the difference between .end() and . back ()

RishiRaj-dlmg