samedi 7 juin 2014

What is the B ig - O complexity class


Vote count:

-1




What is the Big - O complexity class of each code fragment?


Explain why. The complexity for “sequence1” is O(1), “ seq uence2” is O(n), and “ condition ” is O(1).



for (int j=1; j<n; j=j*2) {
sequence1
}


I thought the question already says it is O(1), or is there are difference between Big-O complexity and 'the complexity'?



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire