Showing 3 of 11 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
Design a key-value store that supports storing values with timestamps. You should be able to retrieve the latest value for a key that's less than or equal to a given timestamp.
#2. Time Based Key-Value Store
Determine if a given 9x9 Sudoku board is valid. Check if each row, column, and 3x3 subgrid contains the digits 1-9 without repetition.
#3. Valid Sudoku