Design LFU cache in code editor.
Anonimo
Very obvious that the interviewer was trying to be a pain (in the wrong place) by asking Leetcode hard question and giving a solution within 45 mins. Nevertheless, I came up with solution and one function I gave a O(n) which was not optimal solution for the lack of time. If Leetcode hard question is the benchmark, then I wonder what's the point of doing it in 60 minutes.