单选题
适中
#21065
下面 count_triple 函数的时间复杂度为( )。 int count_triple ( int n ) { int cnt = 0 ; for ( i…
下面 count_triple 函数的时间复杂度为( )。
答案与解析
正确答案:B
解析
两层for循环,每层for循环的上界均为n,总时间复杂度为%O(n^2)%