Traba
1 questions · 1p3a (1)
Traba Phone Screen Interview Experience USA – Cache Design Question
Question Details
Had phone screen for Traba. Their company website is <a href="https://traba.work" target="_blank" rel="noopener" class="text-emerald-400 hover:text-emerald-300 underline">https://traba.work</a> if you want to learn more ## The exercise Your job is to implement a cache as per the below requirements: -get(key: string)-set(key: string, value: string, priority: int)-evictCacheEviction policy: - Remove the key/value pair with the highest priority number - If there is a tie, remove the least recently accessed key/value pair Followup: Any opportunity to improve the time complexity ofevictCache`. I had a linear time complexity and needed to discuss how to improve it ## My reflection Not too bad of an interview problem! The best part was that the interviewer does not expect working code. In fact, for my approach, I was allowed to stub out some of the functions but I talked through the mechanics. Fingers crossed for a pass