Test Case 1 and 5 passed only

@mohammadabdullahjawwad since k can be greater than n, and after n appending the list resets itself, kindlly pass only k%n.
Code:

Gotcha! Thanks a lot @keshavgupta0103