Showing 3 of 6 questions
Find the k most frequent elements in a given array of numbers. Return the top k elements based on their frequency.
#1. Top K Frequent Elements
Implement a Tic-Tac-Toe game where players take turns placing their marks. Design the game logic to efficiently determine the winner after each move.
#2. Design Tic-Tac-Toe
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
Page 1 of 1 · 6 total