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
What is Efficiency of algorithm? Efficiency of an algorithm can be precisely explained and investigated with mathematical rigor.  There are two types of algorithm efficiency

What is an unreachable code assertion An unreachable code assertion can be placed at the default case; if it's every executed, then program is in an erroneous state. A loop in

algorithm for multiplication of two sparse matrices using link list

include int choice, stack[10], top, element; void menu(); void push(); void pop(); void showelements(); void main() { choice=element=1; top=0; menu()

A tree is a non-empty set one component of which is designated the root of the tree while the remaining components are partitioned into non-empty groups each of which is a subtree

In internal sorting, all of the data to be sorted is obtainable in the high speed main memory of the computer. We will learn the methods of internal sorting which are following:

CMY Model  The cyan, magenta, yellow (CMY) colour model is a subtractive model based on the colour absorption properties of paints and inks. As such it has become the standard

Q. Let X = (X1, X2, X3,....Xn) and Y= (Y1, Y2, Y3,....Xm) be the two linked lists respectively. Write down an algorithm to merge the lists together to get the linked list Z such th

infix to revrse polish

Define tractable and intractable problems Problems that can be solved in polynomial time are known as tractable problems, problems that cannot be solved in polynomial time are