+ 1
Time complexity for a loop?
I’m still confused about time complexity. Is a code O(1) if the number of times it loops is less than the Length of an array or is it O(n)?
1 Antwort
+ 2
It depends on type of algorithm, quick sort, binary search, etcetera it is all about the expression, and nested loops. Jamie Charles