Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 241 Bytes

File metadata and controls

9 lines (5 loc) · 241 Bytes

Remove-Node-From-End-of-Linked-List

You are given the beginning of a linked list head, and an integer n.

Remove the nth node from the end of the list and return the beginning of the list.

Input: head = [1,2,3,4], n = 2

Output: [1,2,4]