📜  节点 temp = new Node(6, head, head.getNext()); head.setNext(temp); temp.getNext().setPrev(temp);节点 temp1 = tail.getPrev(); tail.setPrev(temp1.getPrev()); temp1.getPrev().setNext(tail); - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:38.993000             🧑  作者: Mango

代码示例1
Node temp = new Node(6,head,head.getNext());
    Node temp1 = new Node(2,tail.getPrev(),tail);
    head.setNext(temp);
    temp.getNext().setPrev(temp);
    tail.setPrev(temp1);
    temp1.getPrev().setNext(temp1);