Shopee Interview Question

Implement an lru cache with time and space complexity explained