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
write a algorithsm in c to perform push and pop operations stastic implementation using array ?

Define File organization''s and it''s types

algorithm and flow chart to find weather the given numbers are positive or negative or neutral

Explain the bubble sort algorithm. Answer This algorithm is used for sorting a list. It makes use of a temporary variable for swapping. It compares two numbers at an insta

Comp are two functions n 2    and  2 n  / 4  for distinct values of n.   Determine When s ec on d function b ec om es l a r g er th an f i r st functi

data structure for multiqueue

characteristics of a good algorithm

What values are automatically assigned to those array elements which are not explicitly initialized? Garbage values are automatically assigned to those array elements that

Insertion: Records has to be inserted at the place dictated by the sequence of keys. As is obvious, direct insertions into the main data file would lead to frequent rebuilding of

Demonstrate that Dijkstra's algorithm does not necessarily work if some of the costs are negative by finding a digraph with negative costs (but no negative cost dicircuits) for whi