Design Circular Deque Leetcode Javascript Practice