Question: Given two Arrays, A and B, write a C++ function to check if B is a rotation of A. B is a rotation of A
Given two Arrays, A and B, write a C++ function to check if B is a rotation of A. B is a rotation of A iff the elements of B are the same elements of A after being shifted left n times for any integer n. Note: You must use the following header: bool is Rotation(int arr1[], int arr2[])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
