Rubrik | third round | SSE
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2022-02-23Added By Anonymous
Source: Link
Hi All,
I was recently asked a question in one of the interviews of Rubrik for which I am still not sure what will be the right answer. Would love to hear answers from you.
Earlier I was asked to implement LRU Cache and then was asked to use threads.
Since we modify our data structure during both get(key) and put(key, value), I believe both of the functions need to be thread-safe.
But what exactly would be the right implementation?