Challenge Information

Title : Special type of musical instrument
Difficulty : Easy
Solutions : 16
Maximum Score : 50
Completed by You: No
Description :

A child has a musical toy, it has a button, on pressing that button, a song is played from the toy. The songs are stored in the order represented by a number, upon pressing the button, the toy will play the song from the top and move the played song to the bottom of the list, and the next song will become the top song, upon pressing the button again, the new top song will be played and will be moved to the bottom of the list and the next song from the list will become the top song, and so on.

Write a function solve that should accept TWO parameters and return the updated position of songs.

The function should accept the following parameter(s):
1.) arr = an array of integers
2.) a = an integer

Example
Input:
Given following song order:
[15, 20, 25, 30, 35]
We have to press the button 3 times.
Output:
The function will return,
[30, 35, 15, 20, 25]

Explanation
Upon pressing the play button the first time, the order will change as follows:
20
25
30
35
15

Upon pressing the play button the second time, the order will change as follows:
25
30
35
15
20

Upon pressing the play button the second time, the order will change as follows:
30
35
15
20
25

Constraints

Judocode