题库首页 › GESP等级认证(C++) › 题目 10299

下面 schedule 函数的时间复杂度为( )。 #include using namespace std; struct activity { int id, start, end; }; bool compare(activity a, activity b) { return a.end = end) { end = p[i].end; cnt++; } } return cnt; }

A:O(n)
B:O(log(n))
C:O(nlog(n))
D:O(n2)

正确答案:C

试卷来源:202403 CCF-GESP编程能力等级认证C++七级真题

本卷相关题目

在线做题 同科目题库