Showing 3 questions
You are given a collection of intervals. Merge all overlapping intervals into a single interval and return the result.
#1. Merge Intervals
Imagine a grid of land and water. Find the largest connected area of land and return its size.
#2. Max Area of Island
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.
#3. LRU Cache