Number of Recent Calls (opens on LeetCode in a new tab)
Count calls in the inclusive 3000 ms window and test a request exactly at its oldest allowed timestamp.
LAUNCH SALE 50% off every pass
Metadata checked 2026-10-25. LeetCode public problem list
12 matching exercises
Start with one object and a small set of operations. Test capacity limits and time boundaries after each call.
Count calls in the inclusive 3000 ms window and test a request exactly at its oldest allowed timestamp.
Track spaces separately by car type and reject a car when its matching capacity reaches zero.
Preserve front, rear and item count as indices wrap around; test empty and full states.
Expire tokens before actions at the same timestamp, and renew only tokens that are still live.
Represent history, journeys or stored values, then keep each update consistent with the model.
Move within history bounds and discard forward history after visiting a new page.
Match check-ins to check-outs and keep trip count and total duration for each directed station pair.
Store timestamped values per key and return the newest value at or before each query time.
Maintain follow relationships and merge recent posts into a feed of at most ten items.
Allocate the leftmost free block of the requested size, then free every block with the matching memory ID.
Keep lookup and eviction rules consistent as keys, values and usage change.
Keep lookup and recency order consistent; evict the least recently used key when capacity is exceeded.
Your LRU cache now holds redirect mappings. What happens when a link expires, the process restarts or several readers request the same missing code?
Apply this in System DesignMaintain frequency and recency together; break equal-frequency eviction ties by least recent use.
Distinguish complete stored words from prefixes, and test shared paths after inserting another word.