[LeetCode] 19. Remove Nth Node From End of List - 문제풀이
Description 주어진 LinkedList에서 끝에서 n번째 리스트노드를 제거하여 반환하는 문제입니다. Given the head of a linked list, remove the nth node from the end of the list and return its head. Example 1: Input: head = [1,2,3,4,5], n = 2 Output: [1,2,3,5] Example 2: Input: head = [1], n = 1 Output: [] Example 3: Input: head = [1,2], n = 1 Output: [1] Constraints: The number of nodes in the list is sz. 1