Search
⌘K

Leetcode 1756. Design Most Recently Used Queue

Design a queue-like data structure that maintains items ordered by most-recent access, supporting operations to enqueue, dequeue/remove, and "touch" an item to move it to the most-recent position. The challenge is to keep these updates and queries efficient (ideally O(1)) while correctly handling duplicates or capacity constraints if specified.

Asked at:

Meta

Google

Google

Squarespace


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early April, 2026

Meta

Junior

Similar problem, but cache instead of queue to store key-value pairs. implement get, delete, add, and lastAccessed functions

Late March, 2025

Squarespace

Mid-level

The same as LRU cache on Leetcode, just adds in an eviction method based on time in the feed.

Late December, 2024

Google

Google

Mid-level

Most Recently Searched Item (Cache)

Your account is free and you can post anonymously if you choose.