Write a method namedrepeatedSequence that accepts two arrays of integers a1and a2 as parameters and returns true if a2 iscomposed entirely of repetitions of a1 and falseotherwise. For example, if a1 stores the elements {2, 1,3} and a2 stores the elements {2, 1, 3, 2, 1, 3, 2, 1, 3},the method would return true. If the length ofa2 is not a multiple of the length of a1, yourmethod should return false. You may assume that both arrays passedto your method will have a length of at least 1. The following tableshows some calls to your method and their expected results: For full credit, do not modify the elements of the arrays passedin. . . .

"Get 15% discount on your first 3 orders with us"
Use the following coupon
"FIRST15"

Order Now