2022-03-27 20:37:52 +08:00
< p > Given an integer array < strong > sorted< / strong > in non-decreasing order, there is exactly one integer in the array that occurs more than 25% of the time, return that integer.< / p >
< p > < / p >
2023-12-09 18:42:21 +08:00
< p > < strong class = "example" > Example 1:< / strong > < / p >
2022-03-27 20:37:52 +08:00
< pre >
< strong > Input:< / strong > arr = [1,2,2,6,6,6,6,7,10]
< strong > Output:< / strong > 6
< / pre >
2023-12-09 18:42:21 +08:00
< p > < strong class = "example" > Example 2:< / strong > < / p >
2022-03-27 20:37:52 +08:00
< pre >
< strong > Input:< / strong > arr = [1,1]
< strong > Output:< / strong > 1
< / pre >
< p > < / p >
< p > < strong > Constraints:< / strong > < / p >
< ul >
< li > < code > 1 < = arr.length < = 10< sup > 4< / sup > < / code > < / li >
< li > < code > 0 < = arr[i] < = 10< sup > 5< / sup > < / code > < / li >
< / ul >