摘要:
public class LoopNode { int data; LoopNode next = this;//与单链表的不同 public LoopNode(int data) { this.data = data; } //插入节点 public void insertNext(LoopNod 阅读全文
posted @ 2019-11-04 20:20
包莹莹
阅读(272)
评论(0)
推荐(0)
摘要:
public class Node { int data; Node next; public Node(int data) { this.data = data; } //为节点追加节点 public Node append(Node node) //返回值改成Node的好处:n1.append( 阅读全文
posted @ 2019-11-04 20:02
包莹莹
阅读(239)
评论(0)
推荐(0)
摘要:
public class MyQueue { int[] elements; public MyQueue() { elements = new int[0]; } //入队 public void add(int element) { int[] newArr = new int[elements 阅读全文
posted @ 2019-11-04 18:57
包莹莹
阅读(158)
评论(0)
推荐(0)
摘要:
public class MyStack { private int[] elements; public MyStack() { elements = new int[0]; } //压入元素 public void push(int element) { int[] newArr = new i 阅读全文
posted @ 2019-11-04 17:15
包莹莹
阅读(198)
评论(0)
推荐(0)
摘要:
package demo01;import java.util.Arrays;public class MyArray { private int[] elements; public MyArray() { elements = new int[0]; } //获取长度 public int si 阅读全文
posted @ 2019-11-04 16:37
包莹莹
阅读(190)
评论(0)
推荐(0)

浙公网安备 33010602011771号