React+TypeScript 환경에서 Deque에 데이터를 넣어야 할 필요성이 생겼다. 기본적으로 JAVA 환경의 Queue, Deque와 JS환경에서 Queue, Deque의 shift() 함수의 경우 시간복잡도가 O(n)이 걸리는 것을 알고있었고 이를 최적화 하면서 얼마나 시간의 차이가 있는지 확인해보았다.// 기존 Dequeclass OriginalDeque { private items: T[] = []; push(item: T) { this.items.push(item); } pop(): T | undefined { return this.items.pop(); } poll(): T | undefined { return this.items.shift(); } peek..