50 -20 0 30 40 60 11 array 1 26 20 10 20 30 50 11 array 2 50 -20 0 30 40 60 11 Firstelement Lastelement 26 20 10 20 30 50 11 Firstelement Lastelement 50 = 26 / 11 = 11 Lenth 7 Lenth 7 Last elements of two arrays are same True Testing if the first or the last elements of two arrays of integers are same w3resource.com