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
Merge sort is a sorting algorithm which uses the basic idea of divide and conquers. This algorithm initially divides the array into two halves, sorts them separately and then merge

Overlapping or Intersecting A polygon overlaps or intersects the current background if any of its sides cuts the edges of the viewport as depicted at the top right corner of th

Double ended queues are implemented along doubly linked lists. A doubly link list can traverse in both of the directions as it contain two pointers namely left pointers and righ

The insertion procedure in a red-black tree is similar to a binary search tree i.e., the insertion proceeds in a similar manner but after insertion of nodes x into the tree T, we c

Loops There are 3 common ways of performing a looping function: for ... to ... next, while ... endwhile and repeat ... until The below example input 100 numbers and find

Representation of data structure in memory is known as: Abstract data type

the above title please send give for the pdf file and word file

Q. Prove the hypothesis that "A tree having 'm' nodes has exactly (m-1) branches".      Ans: A tree having m number of nodes has exactly (m-1) branches Proof: A root

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

What is the best case complexity of quick sort In the best case complexity, the pivot is in the middle.