Procedure of analysis of algorithm, Data Structure & Algorithms

Example 1:  Following are Simple sequence of statements

Statement 1;

 Statement 2;

...

... Statement k;

The entire time can be found out through adding the times for all statements:

Total time = time (statement 1) + time(statement 2) + ... + time(statement k).

It might be noted that time needed by each statement will greatly vary based on whether each of statement is simple (involves only basic operations) or otherwise. Supposing that each of the above statements involve only basic operation, the time for every simple statement is constant and the total time is also constant: O(1).

Posted Date: 4/4/2013 5:54:46 AM | Location : United States







Related Discussions:- Procedure of analysis of algorithm, Assignment Help, Ask Question on Procedure of analysis of algorithm, Get Answer, Expert's Help, Procedure of analysis of algorithm Discussions

Write discussion on Procedure of analysis of algorithm
Your posts are moderated
Related Questions
Your objective is to write a generic doubly linked list class called CS228LinkedList that implements the List interface and uses a type variable T. All methods except for subList a

Phong Shading Phong shading too is based on interpolation, but instead of interpolating the colour value, it is the normal vector, which is interpolated for each point and a co

Before programming a problem solution those employees a stack, we have to decide how to represent a stack by using the data structures which exist in our programming language. Stac

how do we use 4-discs stack to solve tower of hanoi problem and write an algorithm to solve it?

Programming for hash table?

What are the conditions under which sequential search of a list is preferred over binary search?

Write down any four applications of queues.            Application of Queue (i)  Queue is used in time sharing system in which programs with the similar priority form a queu

When there is requirement to access records sequentially by some key value and also to access records directly by the similar key value, the collection of records may be organized

What is the difference between a grounded header link list and a circular header link list? A header linked list is a linked list which always having a special node, known as t

Q. Define the terms data type and abstract data type. Comment upon the significance of both these.   Ans: We determine the total amount of memory to reserve by determining