Use two directions queue to implement the Deque