Flipkart SDE Interview Question (2023) | Advanced Data Structures & Caching

Flipkart · Question · Posted Jun 2026

Question 1: Design an LRU Cache Problem Statement Design a data structure that strictly follows the constraints of a Least Recently Used (LRU) cache. Implement the LRUCache class with the following specifications: LRUCache(int capacity) Initialize the LRU cache with positive size capacity. int get(int key) Return the value of the key if the key exists, otherwise return -1. void put(int key, int value) Update the value of the key if the key exists. Otherwise, add the key-value pair to the ...

The full answer & interview discussion are available to premium members.

Log in Create a free account