next up previous
Next: TIME COMPLEXITY Up: Algorithm Previous: Work done:

Basic Operation of Sequential Search:

Since step 3 is costliest & other steps are executed no more times, basic operation is comparison of a memory and a register variable.

cost = $k$, if $x = L[k]$
cost = $n$, if $x \not \in L$



Sushil_Prasad 2012-08-23