Deque双端队列 Deque queue = new LinkedList() 三种方式: 普通队列(一端进另一端出): Queue queue = new LinkedList()或Deque deque = new LinkedList() 双端队列(两端都可进出) Deque deque = new LinkedList() 堆栈 Deque deque = new LinkedList() import java.util.Deque; import java.util.LinkedList; import java.util.Scanner; pub...