Showing 3 questions
Calculate the number of days between two given dates. The dates are provided in a specific format, and you need to compute the difference in days.
#1. Number of Days Between Two Dates
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
Implement a circular queue data structure with a fixed size. You'll need to handle enqueueing, dequeueing, and checking if the queue is full or empty efficiently.
#3. Design Circular Queue