Reverse Nodes in k-GroupHardAcceptance Rate 54.2%Given a linked list, reverse the nodes of a linked list k at a time and return its modified head.ExamplesExample 1Inputhead = [1,2,3,4,5], k = 2Output[2,1,4,3,5]ConstraintsThe number of nodes in the list is n.1 <= k <= n <= 50000 <= Node.val <= 1000