Linkedin phone interview Staff Software Engineer

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2021-10-20Added By Anonymous
Source: Link

Company: LinkedIn
Role: Staff Software Engineer
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

Standard cache problem :
should be able to store the values in cache as per capacity.
If the value is present in cache, then get(key) method should return the value from cache. else use the standard cache to get the key and also store that in cache.
if the cache is full, then discard the value with lesser rank. getRank method will help to get the rank.
build the system in a thread safe way

Kind of similar to Leetcode's LRU cache problem

15 mins of leadership/craftsmanship questions

Comments