if we must draw line between efficient and inefficient algorithmsthereforeit is natural to make this distinction be that between those algorithms running in polynomial time and those running in exponential time that ismake the distinction between algorithms with running time that is (nc )for some constant and those with running time that is ( )for some constant like so many notions we have discussed in this sectionthis too should be taken with "grain of salt,for an algorithm running in ( time should probably not be considered "efficient even sothe distinction between polynomial-time and exponential-time algorithms is considered robust measure of tractability examples of algorithm analysis now that we have the big-oh notation for doing algorithm analysislet us give some examples by characterizing the running time of some simple algorithms using this notation moreoverin keeping with our earlier promisewe illustrate below how each of the seven functions given earlier in this can be used to characterize the running time of an example algorithm rather than use pseudo-code in this sectionwe give complete python implementations for our examples we use python' list class as the natural representation for an "arrayof values in we will fully explore the underpinnings of python' list classand the efficiency of the various behaviors that it supports in this sectionwe rely on just few of its behaviorsdiscussing their efficiencies as introduced constant-time operations given an instancenamed dataof the python list classa call to the functionlen(data)is evaluated in constant time this is very simple algorithm because the list class maintainsfor each listan instance variable that records the current length of the list this allows it to immediately report that lengthrather than take time to iteratively count each of the elements in the list using asymptotic notationwe say that this function runs in ( timethat isthe running time of this function is independent of the lengthnof the list another central behavior of python' list class is that it allows access to an arbitrary element of the list using syntaxdata[ ]for integer index because python' lists are implemented as array-based sequencesreferences to list' elements are stored in consecutive block of memory the jth element of the list can be foundnot by iterating through the list one element at timebut by validating the indexand using it as an offset into the underlying array in turncomputer hardware supports constant-time access to an element based on its memory address thereforewe say that the expression data[jis evaluated in ( time for python list