> 其他 >
试写一算法,求出N个数据中的最大值.写出最大语句频度和该算法的时间复杂度
人气:211 ℃ 时间:2020-07-09 16:41:27
解答
#includeusing namespace std;int Max(int a[],int n){int max=a[0];for(int i=1;imax) max=a[i];return max;}void main(){ int a[]={1,9,3,4}; cout
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版