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

Advertisements

About Lekshmana Perumal M

Proud be an Indian, passion to teaching & learn, love mathematics, enjoy with family & friends, job to code. Care about child education, Indian culture
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Time Complexity

  1. Lekshmana Perumal M says:

    hi this is ny test comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s