Map + LinkedList. But Javascript Map actually keeps track of the key in order, so built-in map would be sufficient enough
Here is my code https://github.com/JSerZANP/leetCode_...
Hi I'm a JavaScript engineer who is not good at algorithms,
and currently practicing leetCode online. If you are interested, maybe we can learn together.
En esta página del sitio puede ver el video en línea LeetCode 146. LRU Cache | JavaScript & Algorithm de Duración hora minuto segunda en buena calidad , que subió el usuario JSer 29 mayo 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 3,680 veces y le gustó 31 a los espectadores. Disfruta viendo!