class Solution:
def findSpecialInteger(self, arr) -> int:
count_num = int(len(arr) / 4)
for i in range(len(arr) - count_num):
if arr[i] == arr[i + count_num]:
return arr[i]
```
package T有序数组中出现次数超过25的元素;
public class Solution {
public int findSpecialInteger(int[] arr) {
int l = arr.length / 4;
for (int i = 0; i < arr.length - l; i++) {
if (arr[i] == arr[i + l]) {
return arr[i];
}
}
return -1;
}
}