LRU Cache1 [Leetcode] 146. LRU Cache 문제 요약 알고리즘 분류: Hash, 자료구조, 링크드 리스트 난이도: Medium 문제내용: LRU Cache class 구현해라 LRUCache(int capacity) capacity은 용량 사이즈이다. get 메소드는 key가 있을경우 값을 출력하고 아닐경우 -1로 출력한다. put 메소드는 값을 집어 넣는다. 용량이 초과 할경우 최근 사용도 순으로 삭제한다. 사이트 주소: https://leetcode.com/problems/lru-cache/description/ LRU Cache - LeetCode Can you solve this real interview question? LRU Cache - Design a data structure that follows the constraints .. 2024. 3. 6. 이전 1 다음