Articles for author: Srishti Trivedi

Time Complexity

Whenever we are thinking of a solution to a problem, there can be N number of solutions. For instance, any problem can be solved in multiple different ways. But the Question that arises here is, how can we recognize the most efficient solution if we have a set of different solutions? To answer this question ...

LRU Cache Implementation

Problem Statement Design a data structure to implement following the operations of Least Recently Used (LRU) Cache – Note – The compulsion here is that, you need to implement such that both the put and the get operation take O(1) time on an average. LRU Cache Before beginning with the LRU Cache, let’s see what does a cache means? We know that we ...