Least Recently Used Cache - Data Structures and Algorithms

Опубликовано: 08 Февраль 2026
на канале: Restful Coder
504
13

Let's take a look at a common algorithm question, how can you implement a Least Recently Used Cache with O(1) operations. Here we'll look at Linked Lists, Doubly Linked Lists, and Dictionaries.

#leetcode #technicalinterview #softwareengineer

Chapters
00:00 Intro
00:25 What is Cache?
00:45 What is the behavior?
02:27 Linked Lists
03:19 Doubly Linked List
04:09 List of size three
05:25 How to improve from O(n) to O(1) operations
06:00 Adding a dictionary
06:30 Getting O(1) operations
07:00 Updating the list and dictionary

Social
🌍 Website: https://restfulcoder.com/
💬 Discord:   / discord  
📷 Instagram:   / restfulcoder  
🐦Twitter:   / restfulcoder  
📱 Tiktok:   / restfulcoder