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
Determine if you can construct a ransom note from the letters in a magazine. Each letter in the magazine can only be used once.
#2. Ransom Note
You are given a collection of intervals. Merge all overlapping intervals into a single interval and return the result.
#3. Merge Intervals