public static ListNode reveseList (ListNode head) {
// write code here
ListNode tmp=head.next;
ListNode newHead=reveseList(head.next);
tmp.next=head;
head.next=null;
return newHead;
}
public static ListNode reveseList (ListNode head) {
// write code here
ListNode tmp=head.next;
ListNode newHead=reveseList(head.next);
tmp.next=head;
head.next=null;
return newHead;
}