DEV Community

Discussion on: Let's build Spotify's Recent Search functionality with LRU caching mechanism. Microsoft Interview question.

Collapse
 
diecurti profile image
Diego Curti

Nice post!
I found a little mistake, the first definition of moveToHead is wrong. It's correct when you've put everything together.

DLL next = node.next;

Should be:

DLL next = head.next;
Collapse
 
akhilpokle profile image
Akhil

Ohh my that's a blunder mistake! Thanks for pointing that out !!