[LeetCode#641] Design Circular Deque
·
Algorithm/문제풀이
❒ Description제목Design Circular Deque링크https://leetcode.com/problems/design-circular-deque/description/자료구조선형 (배열 / 이중 연결 리스트)시간복잡도O(1)이번 문제는 이중 연결 리스트로 Circular-Deque를 구현하는 문제였다.근데 사실 이중 연결 리스트로 Circular-Deque를 구현하면 원형의 이점을 살릴 수 없다.실제로 원형의 이점을 살리기 위해선 이 문제를 연결리스트가 아닌 배열로 풀이해야 한다.따라서 이번 문제는 이중 연결 리스트와 배열 모두 구현 해볼 것이다. ❒ Solution1. 이중 연결 리스트 (Doubly-Linked List)더보기public class MyCircularDeque {..