Reorder an array by x elements in Python


Given an array of size n, write a function to move x elements from the front to the end of the array.

For example:

#Given the following:
array = [2,4,6,8,10]
x = 3

#To shift 3 elements you would return:

Solution will be written in Python.


Access restricted

Subscribe to premium account to see the solution.

Get premium now