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
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

Deletion Algorithm for dequeue Step 1: [check for underflow]   If front = 0 and rear = 0   Output "underflow" and return Step 2: [delete element at front end]   If front

Develop a program that accepts the car registration( hint: LEA 43242010)

A linked list can be of the following types:-  Linear linked list or one way list Doubly linked list or two way list. Circular linked list Header linked list

Explain Internal and External Nodes  To  draw  the  tree's  extension  by  changing  the  empty  subtrees  by  special nodes. The  extra  nodes shown by little squares are know

an electrical student designed a circuit in which the impedence in one part of a series circuit is 2+j8 ohms and the impedent is another part of the circuit is 4-j60 ohm mm program

Prove that uniform cost search and breadth- first search with constant steps are optimal when used with the Graph-Search algorithm (see Figure). Show a state space with varying ste

The location of a node in a binary search tree is defined as a string such as LLRRL, which represents the node that you find by starting at the root, and traversing Left, traverse

Thus far, we have been considering sorting depend on single keys. However, in real life applications, we may desire to sort the data on several keys. The simplest instance is that

write pseudocode to implement a queue with two stacks