here is a very fundamental question.... many a times i have seen if anybody wants to talk about performance of a code then they refer time complexity . what exactly does it mean ?
my confusions are
(1) is it the time to complete the execution of code ? ( i guess it is not. though not sure)
(2) suppose a code has time complexity O(n*log n ) . what does it mean ? what does n stands for ?
i found n has different meaning in different context .
(a) n may be number of data . (right ?)
( b) n may be number of iteration .
(c) n may be time ? (right?)
i am really confused what exactly n stand for ? is not it a unique thing?
(3) At last , i want to know how can i calculate the time complexity of a code ? yes, there are examples in the book (e.g selection sort,merge sort,...many many) , i am not talking about those things.
i am saying ....suppose i wrote an arbitrary code which works. how do i start calculating its complexity ? can u give some tips or in general steps ?
if anybody give responses according to question i will be highly benefited....bcoz those are my confusions.
thanks for reading this stuff.