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
Worst Case: For running time, Worst case running time is an upper bound with any input. This guarantees that, irrespective of the type of input, the algorithm will not take any lo

reverse the order of elements on a stack S using two additional stacks using one additional stack

The structures of files vary from operating system to operating system. In this unit, we will discuss the fundamentals of file structures with the generic file organisations. A

Preconditions assertion A precondition is an assertion which should be true at the initiation of an operation. For instance, a square root operation can't accept a negative a

Document processing is quickly becoming one of the dominant functions of computers. Computers are utilized to edit, search & transport documents over the Internet, and to display d

#why all the 4 operations i.e. insertion n deletion from rear end and front end is valid in input restricted DEQUE

The number of leaf nodes in a complete binary tree of depth d is    2 d

Explain divide and conquer algorithms  Divide  and  conquer  is  probably  the  best  known  general  algorithm  design  method.  It   work according to the following general p

how to do a merge sorting