In simple terms , we can say O(n) means linear , time will increase "Linearly" based on the input ,When "n" doubles, so does the running time. ...
and space complexity is that number of memory cells it will take ... Generally , this is so called time-space-tradeoff ....
http://www.leda-tutorial.o
Main Topics
Browse All Topics





by: sunnycoderPosted on 2008-09-28 at 02:21:55ID: 22590335
Hello CIPL-Senthil,
ki/Analysi s_of_algor ithms ki/Big_O_n otation
oduction-A lgorithms- Thomas-H- C ormen/dp/0 262032937
O(n) space complexity means that algorithm would require about the same space as the amount of input that it needs to process. i.e. algos space requirement increases linearly with input volume.
Similarly O(n) time complexity means that time taken by an algo inceases lineraly with input volume.
You can normally tell the complexity by examining the algoirithm. Almost always it will be defined by the number of nested loops you have.
http://en.wikipedia.org/wi
http://en.wikipedia.org/wi
Book
http://www.amazon.com/Intr
Regards,
sunnycoder