daily leetcode - remove-nth-node-from-end-of-list - !
题目地址 https://leetcode.com/problems/remove-nth-node-from-end-of-list/ 题目描述 Given a linked list, remove the n th node from the end of list and return its head. For example, Given linked list: **1- >2->3->4->5**, and **_n_ = 2**. After removing the second node from the end, the linked list becomes **1- >2->3->5**. Note: Given n will always be valid. Try to do this in one pass. Follow up: Could you do this in one pass? 思路 这道题让我们移除链表倒数第 N 个节点,限定 n 一定是有效的,即 n 不会大于链表中的元素总数。还有题目要求....