Showing 3 of 13 questions
You're given two encoded strings representing an original string compressed using run-length encoding. Determine if it's possible to reconstruct a valid original string that satisfies both encodings.
#1. Check if an Original String Exists Given Two Encoded Strings
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
Given a grid representing land and water, count the number of distinct islands. An island is formed by connected land cells.
#3. Number of Islands
Page 1 of 1 · 13 total