Showing 3 of 9 questions
Given a grid representing land and water, count the number of distinct islands. An island is formed by connected land cells.
#1. Number of Islands
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.
#2. LRU Cache
Find the smallest subarray within a given array that has the same degree as the entire array. The degree is defined as the highest frequency of any element.
#3. Degree of an Array
Page 1 of 1 · 9 total