1. 快指针 = head
    2. 慢指针 = head
    3. while(快指针.next){
    4. if(N-- <= 0){
    5. 慢指针 = 慢指针.next
    6. }
    7. 快指针 = 快指针.next
    8. }
    1. // 取中间的
    2. let fast = head,slow=head
    3. while(fast.next){
    4. fast = fast.next
    5. if (fast.next) fast = fast.next
    6. slow= slow.next
    7. }
    1. let start = head
    2. let fast = head
    3. let slow = head
    4. while(fast && fast.next){
    5. fast = fast.next.next;
    6. slow = slow.next;
    7. if (slow==fast){
    8. while(slow != start){
    9. slow= slow.next
    10. start = start.next
    11. }
    12. return start
    13. }
    14. }
    • 找到链表的倒数第k位
    • 求一个有序链表的值域的中位数
    • 判断循环链表的循环入口位置