摘要: 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 ... 阅读全文
posted @ 2018-03-20 19:27 mayinmiao 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1 public class DequeStructure { 2 Deque stack1; 3 Deque stack2; 4 public DequeStructure () { 5 stack1 = new LinkedList(); 6 stack2 = new LinkedList(); 7 } ... 阅读全文
posted @ 2018-03-20 03:56 mayinmiao 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 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); ... 阅读全文
posted @ 2018-03-20 03:54 mayinmiao 阅读(171) 评论(0) 推荐(0) 编辑