The running time of an algorithm on a particular input is the number of primitive operations or steps executed. For defining the notion of step, RAM model viewpoint will be kept. In actual practice, a constant amount of time is required to execute each line of pseudo code. One line may take a different amount of time than another line. Let us assume each execution of the ith line takes time ci, where ci is a constant.
No comments:
Post a Comment