package leetcode;

/**
 * https://leetcode.com/problems/design-circular-deque/
 */
public class Problem641 {
    private static class MyCircularDeque {

        /** Initialize your data structure here. Set the size of the deque to be k. */
        public MyCircularDeque(int k) {
            // TODO
        }

        /** Adds an item at the front of Deque. Return true if the operation is successful. */
        public boolean insertFront(int value) {
            // TODO
            return false;
        }

        /** Adds an item at the rear of Deque. Return true if the operation is successful. */
        public boolean insertLast(int value) {
            // TODO
            return false;
        }

        /** Deletes an item from the front of Deque. Return true if the operation is successful. */
        public boolean deleteFront() {
            // TODO
            return false;
        }

        /** Deletes an item from the rear of Deque. Return true if the operation is successful. */
        public boolean deleteLast() {
            // TODO
            return false;
        }

        /** Get the front item from the deque. */
        public int getFront() {
            // TODO
            return 0;
        }

        /** Get the last item from the deque. */
        public int getRear() {
            // TODO
            return 0;
        }

        /** Checks whether the circular deque is empty or not. */
        public boolean isEmpty() {
            // TODO
            return false;
        }

        /** Checks whether the circular deque is full or not. */
        public boolean isFull() {
            // TODO
            return false;
        }
    }

    public static void main(String[] args) {
        
    }
}

@@ -1733,16 +1733,644 @@
         
+MyCircularDeque deque = new MyCircularDeque(3);%0A        System.out.println(deque.insertLast(1)); // return true%0A        System.out.println(deque.insertLast(2)); // return true%0A        System.out.println(deque.insertFront(3)); // return true%0A        System.out.println(deque.insertFront(4)); // return false, the queue is full%0A        System.out.println(deque.getRear()); // return 32%0A        System.out.println(deque.isFull()); // return true%0A        System.out.println(deque.deleteLast()); // return true%0A        System.out.println(deque.insertFront(4)); // return true%0A        System.out.println(deque.getFront()); // return 4
 %0A    %7D%0A%7D

Update problem 641