//反转双向链表
public class DoubleNode{
public int value;
public DoubleNode last;
public DoubleNode next
public DoubleNode(int data){
this.value=data;
}
}
public DoubleNode reverseDoubleLinkedList(DoubleNode head){
DoubleNode pre=null;
DoubleNode next=null;
while(head!=null){
next=head.next;
head.next=pre;
head.last=next;
pre=head;
head=next;
}
return pre;
}