LeetCode - LRU Cache
쿠팡에서 설계 문제로 나온 LRU Cache. 핵심 포인트는 HashMap과 LinkedList를 동시에 유지하는 것. 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 size capacity. int get(int key) Return the value of the key if the key exists, otherwise return -1. void put(int key, int value) Update the value of..
프로그래밍
2021. 6. 3. 05:22
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday