longest repeating subarray in sorted arrary