K12教育赛事综合服务平台
专注青少年竞赛题库网站
聚乐之家官方网站
下载聚乐之家官方App
下面程序是用枚举法查找最大值的索引,横线处应该填写的是?
arr = 3, 7, 2, 9, 5 maxIndex = 0 for i in range(1, len(arr)): if ____________________: maxIndex = i print(maxIndex)
arr[maxIndex] > arr[i]
arr[i-1] > arr[maxIndex]
arr[i] > arr[maxIndex]
arr[i+1] > arr[maxIndex]