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
The time needed to delete a node x from a doubly linked list having n nodes is O (1)

Q. Explain various graph traversal schemes and write their advantages and disadvantages. A n s . Graph Traversal Scheme is explained below In many troubles we wish

Write an algorithm in the form of a flowchart that: inputs top speeds (in km/hr.) of 5000 cars Outputs fastest speed and the slowest speed Outputs average (mean) s

Binary Space Partition A binary space-partitioning (BSP) tree is an efficient method for determining object visibility by painting surfaces onto the screen from back to front,

Explain about Hidden-surface Hidden-line removal refers to wire-frame diagrams without surface rendering and polygonal surfaces with straight edges. Hidden-surface removal ref

Q1. Define a sparse matrix. Explain different types of sparse matrices? Evaluate the method to calculate address of any element a jk of a matrix stored in memory. Q2. A linear

Q. Assume that we have separated n elements in to m sorted lists. Explain how to generate a single sorted list of all n elements in time O (n log m )?

Define container in terms of  object-oriented terms A Container is a broad category whose instances are all more specific things; there is never anything which is just a Contai

5. Implement a stack (write pseudo-code for STACK-EMPTY, PUSH, and POP) using a singly linked list L. The operations PUSH and POP should still take O(1) time.

Complexity is the rate at which the needed storage or consumed time rise as a function of the problem size. The absolute growth based on the machine utilized to execute the program