Rubrik | third round | SSE
3917

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?

Comments (5)