Remove Nth Node From End of ListMediumAcceptance Rate 41.5%Given the head of a linked list, remove the nth node from the end of the list and return its head.ExamplesExample 1Inputhead = [1,2,3,4,5], n = 2Output[1,2,3,5]ConstraintsThe number of nodes in the list is sz.1 <= sz <= 300 <= Node.val <= 1001 <= n <= sz