早教吧 育儿知识 作业答案 考试题库 百科 知识分享

请问Big-Oh是什么意思?请翻译:lGivenfunctionsf(n)andg(n),ifthereexistconstantscandMsuchthat:f(n)=M,wherec>0andM>0,then,f(n)issaidtobeO(g(n)).

题目详情
请问Big-Oh是什么意思?
请翻译:lGiven functions f(n) and g(n),if there exist constants c and M such that:
f(n) = M,where c > 0 and M > 0,then,f(n) is said to be O(g(n)).
▼优质解答
答案和解析
常见的Big-oh
  对于比较2个不同的时间复杂度,千万不可以用直观的方法来判断.例如有2种算法,时间复杂度各为O(n)与O(n2).如果这2种方法的实际执行次数T'(n)=2n,T"(n)=n2,则n>2时,2n