Given two arrays of integers A and B, of same size, check and return whether B is rotated form of A or not.
Both left and right rotations are possible.
The first argument given is the integer array A. The second argument given is the integer array B.
Return 1 if B is rotated form of A else return 0.
1 <= length of both arrays <= 100000 -10^9 <= A[i], B[i] <= 10^9
Input 1: A = [1, 2, 3, 4, 5] B = [3, 4, 5, 1, 2] Output 1: 1 Input 2: A = [5, 17, 100, 11] B = [5, 100, 17, 11] Output 2: 0
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.