简体   繁体   中英

What is the time complexity for this?

nlog2n+3n^2+4n^3+n+10

from this polynomial what we supposed to consider either O(n^3) or O(logn)

from log2n we can have log2+logn right so it is logn .like wise

what we have to consider please tell me?

实际上,它是O(m * n),除非您有错字,并且两个循环都应从0迭代到n,在这种情况下,它应该是O(n ^ 2)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM