This was before I joined FB. 1 hour bar raiser interview. Interviewer wasted 35 minutes on LP. During that time interviewer kept blabbering ‘Bar raiser isn’t supoosed to be a ‘hard’ round’ Then gave a question. Solution turned out to be an upgraded LRU cache: one LRU cache per user. So, basically implement a Map of Map instead of the usual single map. LRU by itself takes a looong time, and I had to do an upgraded version - all get, update methods within 25 minutes. Obviously I couldn’t finish the coding. Do you think 25 minutes was a reasonable time?
In Amz interview it feels so frustrating talking about silly LP while I could have been solving problems.
The majority of your work is interacting with others to come to decisions.
No
Actually straightforward LRU with O(n) complexity and no synchronization requirements is pretty basic and 25 minutes should be sufficient. On the other hand, it's of course one of the most overused interview questions and it's kind of lame to be asked to do it over and over again
Wanna bet?
Read the post. It wasn’t a straightforward LRU
Solid code in 25 minutes for a problem like this is unreasonable for complete threadsafe code. It’s possible if you just solved it the other night and planned exactly how to optimize the whiteboard space. 45 minutes is more reasonable.
Isn't it just linkedlist with map? How is it not doable in 25 mins? Unless the containers are not threadsafe and you need to implement concurrency
Dll
Sure, same thing
Oh man. I do interviews at Amazon and I ask my 2 assigned LPs in 15minutes! After that I say: "We're done with the boring part. Lets do the FUN part now shall we? Coding! 😁"
25 mins for LRU cache is bs unless its okay to comeup with skeleton code or you memorized it like no tomorrow 🤣
If you memorized it should be 5 minutes, if not GG
waat! you can write the whole thing in 5 mins?