Left Rotation Of Array in Data structure with Python in Hacker rank.

preview_player
Показать описание
A left rotation operation on an array of size shifts each of the array's elements unit to the left. Given an integer, , rotate the array that many steps left and return the result.

Example

After rotations, .

Function Description

Complete the rotateLeft function in the editor below.

rotateLeft has the following parameters:

int d: the amount to rotate by
int arr[n]: the array to rotate
Рекомендации по теме
welcome to shbcf.ru