Your task is to determine whether an array has the same sequence of numbers at the beginning and the end, and if so, how long that sequence is.

For example, the array

1 4 9 10 11 12 1 4 9

has the same sequence 1 4 9 at the left and the right, and it has length 3.

If the array doesn't have a common sequence at the left and the right, such as

1 4 9 16 25

return 0.

The two sequences cannot overlap. For example, in the array

1 1 1 1

the sequence 1 1 occurs at the left and the right, and your method should return 2.

Complete the following file:

Numbers.java

public class Numbers { /** Computes the length of the longest sequence that occurs in the start of the left half and the end of the right half of an array. @param values an array of integer values @return the length of the longest end sequence */ public int sameEnds(int[] values) { // your work here } }