Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器 软件资源

软件开发小程序制作系统集成与运维空间租用硬件开发视频监控技术咨询与支持——联系电话:0311-88999002/88999003

首页 / 软件开发 / 数据结构与算法 / 合并有序链表

合并有序链表2010-11-19zhangjunhd场景:存在表L1(A B C D E),有序表L2(2 4 8),有序表L3(2 5).删除表L1中位 置序号属于有序表L2和L3,即删除后L1(A C).

使用的是一个链表节点

public class Inode {
private int value;
private Inode next;
public Inode(int value) {
this.value = value;
next = null;
}
public Inode(int value, Inode next) {
this.value = value;
this.next = next;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
public Inode getNext() {
return next;
}
public void setNext(Inode next) {
this.next = next;
}
}