标签:code opened nod == view play span step list
public class InsertList { public Node Insert(Node headNode1, Node headNode2) { Node headNode = null; Node base = new Node(headNode1); Node step = new Node(headNode2); if (base == null && step != null) { headNode = headNode; } else if (step == null && base != null) { headNode = headNode; } else if (base != null && step != null) { Node prebase = null; while (step != null) { while (base != null) { if (base.data >= step.data) { Node insertNode= new Node(step.data); if (prebase == null) { insertNode.next = base; headNode=insertNode; } else { prebase.next = insertNode; insertNode.next = base; } break; } prebase = base; base = base.next; } step = step.next; } } return headNode; } }
标签:code opened nod == view play span step list
原文地址:https://www.cnblogs.com/zecdllg/p/9767056.html