Traba interview question

Variation of LFU cache problem