Rotate a vector without using any library functions
Implement def rotate_vector(nums, k): to rotate the vector to the right by k positions in place and return it. Do not use built-in rotation, slicing, or reverse functions. If k exceeds the vector length, reduce it modulo the length.
Input is a non-empty list of integers and a non-negative integer k. Return the same list object after rotation.
def rotate_vector(nums, k):