Question: c++ iostream .... - 3 Given two Arrays, A and B, write a C++ function to check if B is a rotation of A B
c++ iostream ....

- 3 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 if the elements of B are the same elements of A after being shifted left n times for any integer n. For example: if A={1, 2, 3, 4) and B=(3, 4, 1, 2} then the function will return true because the elements of B are the same as A after being shifted left twice. Note: You must use the following header: bool isRotation(int arri.int arr2(1): shion B 5 US X2 x o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
