CompensationOct 5, 2019
NewGTFO_or_TC

LRU Cache - Are u f*** kidding me !

The long-awaited day has finally come. Oh man, 150 LC, I gotta celebrate somehow. So guess what, I'm gonna solve LRU Cache question. HOLY CRAP ! Like seriously ? Does an interviewer expect a candidate to solve that under 35 minutes without having seen it before ??! Hiring is broken, period. PS: the question is now Medium on LC, gonna be Easy in just less than a year. TC: None

Add a comment
Oracle R2d2c3p0 Oct 5, 2019

And then you discover LFU cache

New
GTFO_or_TC OP Oct 5, 2019

lol

Informatica weworkce Oct 5, 2019

And then they follow up with O(1) complexity

Amazon AmazonBoob Oct 5, 2019

Doesnt know LRU, only 150 LC, what do you expect?

Pandora x0kjF Oct 5, 2019

Isn't hard, you just have to keep the order stuff was accessed in a data structure. Which data structure do you use? Whatever it needs to have fast removals.

Amazon booobkjj Oct 5, 2019

150 is nothing. Get back to LC.

Amazon 😁||😆 Oct 5, 2019

Rookie numbers. I personally do a LC before a Blind post, then another right after.

New
GTFO_or_TC OP Oct 5, 2019

yeah i know it's nothing

Amazon Db8db4 Oct 5, 2019

I solved it without seeing it before. Actually without any leet code prep (or "back in the day" equivalents)...

Zillow Group “ Oct 5, 2019

Please get an extra banana next week, you deserve it

Amazon Db8db4 Oct 5, 2019

Bananas are a great source of potassium.

Apple Patriarchy Oct 5, 2019

Is in CTCI book.

eBay Ubagbjka Oct 5, 2019

Ok, now people freaking out not getting a standard useless Algorithm type question in the interview. At least LRU is close to reality

New
Kukabu Oct 5, 2019

LRU is for a change something which is actually used in various actual environments, and is correctly a Medium

Walmart WmWifi Oct 5, 2019

I use it all the time. new LruCache();

Google cigsinside Oct 5, 2019

I got asked this question by a 5 man startup for an internship where 90% of the work I'd be doing was front end... And when I started down the right path the interviewer basically told me I was doing it all wrong and don't need a doubly-linked list. Real glad I didn't get that job

Cisco koala 🐨 Oct 5, 2019

?? What did he suggest using then

Google cigsinside Oct 5, 2019

He just goes "you're on the wrong track. try something else"

Walmart literalbot Oct 5, 2019

Try Alien Dictionary. That problem gets asked all the time. Keep grinding ;)