Given the head of a singly linked list and an integer n, move the last n nodes to the front. Return the new head.
If n >= length, use n = n % length. If n == 0, return unchanged.
Input: Head of a singly linked list and integer n.
Output: Head of the updated list.
Input: [1,2,3,4,5], 2
Output: [4,5,1,2,3]
Explanation: Last 2 nodes [4,5] move to front.Input: [1,2,3,4,5], 0
Output: [1,2,3,4,5]
Explanation: n=0. No change.Input: [1,2,3,4,5], 5
Output: [1,2,3,4,5]
Explanation: n=5, n%5=0. No change.1<=nodes<=10^5-10^9<=Node.val<=10^90<=n<=10^9