In Priority Expiry Cache problem: Priority Expiry Cache Problem - Big-O Notation For Coding Interviews and Beyond
In the solution, for evictItem() expired case, when removing the item from priority min-heap, you say this takes O(logn) time complexity.
However since you need to first find the item in the heap (since it’s may not be min at priority min-heap) that should take O(n) time complexity.
Could you elaborate on why you said O(logn) when removing the expired item from priority min-heap?