Complexity of an algorithm, Data Structure & Algorithms

An algorithm is a sequence of steps to solve a problem; there may be more than

one algorithm to solve a problem. The choice of a particular algorithm depends upon following consideration:-

1)      Time Complexity

2)      Space Complexity

Time Complexity:- The time complexity of an algorithm is the amount of time it needs to run to completion. Some of the reasons for studying time complexity are:-

       We may be interested to know in advance whether the program will provide a satisfactory real time response.

       There may be several possible solutions with different time requirement.

Space  Complexity:- The space complexity of an algorithm is the amount of memory it  needs to  run  to  completion. Some of  the  reasons to  study space complexity are: -

       There may be several possible solutions with in different space requirement.

       To estimate the size of the largest problem that a program can solve.

 

 

Posted Date: 7/12/2012 9:21:39 AM | Location : United States







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

Write discussion on Complexity of an algorithm
Your posts are moderated
Related Questions
Q. Convert the following given Infix expression to Postfix form using the stack function: x + y * z + ( p * q + r ) * s , Follow general precedence rule and suppose tha

Problem 1. Explain about the doubly linked list with neat diagram. Diagram Explaining doubly linked list 2. Explain what are the criteria to be used in evaluatin

The size of stack was declared as ten. Thus, stack cannot hold more than ten elements. The major operations which can be performed onto a stack are push and pop. However, in a prog

How sparse matrix stored in the memory of a computer?

how we can convert a graph into tree

Q. Explain the various memory allocation strategies.                                                            Ans. M e m ory Allocation Strategies are given as follow

WHAT IS THE PURPOSE OF STACK IN C

Define Complete Binary Tree Complete Binary Tree:- A whole binary tree of depth d is that strictly binary tree all of whose leaves are at level D.

I need to know about data structure and algorithms. can you help me?

C compiler does not verify the bounds of arrays. It is your job to do the essential work for checking boundaries wherever required. One of the most common arrays is a string tha