双向链表

来源:互联网 发布:音画同步软件 编辑:程序博客网 时间:2024/06/05 02:05

class NodeList{
int val;
NodeList next ,prev
NodeList(int val ){
this.val=val;
next=prev=null;

}
public NodeList inverse(NodeList head){
ListNode temp = new NodeList();
while(head.next!=null){
temp = head;
head=head.next;
temp.prev=temp.next;
prev=head;
}
}

}

0 0
原创粉丝点击