java数据结构-循环链表实现测试
package com.node;/** * @auther 付强 * @date 2020/2/14 - 13:25 *///循环链表测试public class TestLoopNode { public static void main(String[] args) { LoopNode n1 = new LoopNode(1); LoopNode n2 = new LoopNode(2); LoopNode n3 = new LoopNode(3); LoopNode n4 = new LoopNode(4); LoopNode n5 = new LoopNode(5); //增加节点 n1.after(n2); n2.after(n3); n3.after(n4); n4.after(n5); System.out.println(n1.next().getData()); System.out.println(n2.next().getData()); System.out.println(n3.next().getData()); System.out.println(n4.next().getData()); System.out.println(n5.next().getData()); }}
相关推荐
koushr 2020-11-12
zhangxiafll 2020-11-13
kikaylee 2020-10-31
范范 2020-10-28
MILemon 2020-10-22
hugebawu 2020-10-12
LauraRan 2020-09-28
shenwenjie 2020-09-24
omyrobin 2020-09-23
guangcheng 2020-09-22
qiangde 2020-09-13
hanyujianke 2020-08-18
晨曦之星 2020-08-14
xiesheng 2020-08-06
KAIrving 2020-08-02
xiesheng 2020-08-02
范范 2020-07-30
chenfei0 2020-07-30