Problem Description
Given an array of integers A and multiple values in B which represents the indices of the array A around which left rotation of the array A needs to be performed.
Find the rotated array for each value and return the result in the from of a matrix where i'th row represents the rotated array for the i'th value in B.
1 <= length of both arrays <= 2000
-109 <= A[i] <= 109
0 <= B[i] <= 2000
The first argument given is the integer array A.
The second argument given is the integer array B.
Return the resultant matrix.
Input 1:
A = [1, 2, 3, 4, 5] B = [2, 3]
Input 2:
A = [5, 17, 100, 11] B = [1]
Output 1:
[ [3, 4, 5, 1, 2] [4, 5, 1, 2, 3] ]
Output 2:
[ [17, 100, 11, 5] ]
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.