About 96,800 results
Open links in new tab
  1. LRU Cache - LeetCode

    Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement the LRUCache class: LRUCache(int capacity) Initialize the LRU cache with positive …

  2. LFU Cache - LeetCode

    When the cache reaches its capacity, it should invalidate and remove the least frequently used key before inserting a new item. For this problem, when there is a tie (i.e., two or more keys …

  3. Discuss - LeetCode

    I’m a first-year student exploring AI/ML (or any other domain) and currently sharpening my Python + problem-solving skills (LeetCode, small projects, etc.).. My long-term goal is to contribute to …

  4. Find the Minimum and Maximum Number of Nodes Between

    If there are fewer than two critical points, return [-1, -1]. Example 1: [https://assets.leetcode.com/uploads/2021/10/13/a1.png] Input: head = [3,1] Output: [-1,-1] …