Showing 3 of 21 questions
Design a data structure that acts as a Least Recently Used (LRU) cache. Implement methods to get and put key-value pairs, evicting the least recently used entry when the cache is full.
#1. LRU Cache
You are given a collection of intervals. Merge all overlapping intervals into a single interval and return the result.
#2. Merge Intervals
Determine if you can construct a ransom note from the letters in a magazine. Each letter in the magazine can only be used once.
#3. Ransom Note
Page 1 of 1 · 21 total