// 解法一
function fo(head,n){
let list = head;
let len = 0;
while(list.next != null){
++len;
list = list.next;
}
let i = len - n;
while(list.next != null){
++len;
if(len == i){
return list;
} else {
list = list.next;
}
}
}
// 解法二
function fo(head,n){
let list1 = head;
let list2 = head;
while(n==0){
n--;
list1 = list1.next;
}
while(list1.next != null){
list1 = list1.next;
list2 = list2.next;
}
}