二叉搜索树与双向链表
public class Day1020 {
public ListNode reverseList(ListNode head){
if(head==null||head.next==null) return head;
ListNode p=null,q,s;
q=head;
while(q!=null){
s=q.next;
q.next=p;
p=q;
q=s;
}
return p;
}
}