摘要:
1 public class Solution 2 { 3 public static void main(String[] args) 4 { 5 // 1 --> 2 --> 3 --> 5 --> 4 --> 6 --> 0 --> null 6 // 0 1 2 3 4 5 6 ... 阅读全文
摘要:
1 public class DequeStructure { 2 Deque stack1; 3 Deque stack2; 4 public DequeStructure () { 5 stack1 = new LinkedList(); 6 stack2 = new LinkedList(); 7 } ... 阅读全文
摘要:
1 import java.util.*; 2 3 public class TwoStackImplementDeque { 4 public static void main(String[] args) { 5 DequeStructure d = new DequeStructure(); 6 d.leftPush(4); ... 阅读全文