Time Complexity

Constant Time
An algorithm is said to be constant time (also written as O(1) time) if the value of T(n) is bounded by a value that does not depend on the size of the input
T(n)=O(1).
For example, accessing any single element in an array takes constant time
the number of elements is known in advance and does not change, however, such an algorithm can still be said to run in constant time.
Linear Time
T(n)=O(n)

src:
http://en.wikipedia.org/wiki/Logarithmic_time#Logarithmic_time

1 thought on “Time Complexity

Leave a reply to Lekshmana Perumal M Cancel reply