Problem
Given thehead of a linked list, remove the n<sup>th</sup> node from the end of the list and return its head.
Examples
Constraints
- The number of nodes in the list is
sz. 1 <= sz <= 300 <= Node.val <= 1001 <= n <= sz
Tested Python solution for LeetCode 19 with 18 pytest cases. Generate a practice environment with lcpy.
head of a linked list, remove the n<sup>th</sup> node from the end of the list and return its head.
sz.1 <= sz <= 300 <= Node.val <= 1001 <= n <= sz