虽然不算最优解,但是满足题意,时间复杂度O(n),空间复杂度O(1) 先找到最大值-》确定数组的长度 统计值的个数 遍历取出最大值的索引 public class Solution { public int MoreThanHalfNum_Solution(int [] array) { int max = array[0]; for(int a : array){ if(a>max){ max = a; } } in...