TikTok Interview Question

writing LFU algo from scratch