1p3a Question · Dec 2025 · USA

Traba Phone Screen Interview Experience USA – Cache Design Question

SWE Phone Screen

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)`

Full 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)-evictCache` Eviction 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 of evictCache. 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

About This Question

This is a reported interview question from a traba interview for a swe role during the phone screen round reported in 2025.

It covers the following topics: Strings .

Topics