Complexity of an algorithm, Data Structure & Algorithms

Assignment Help:

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.

 

 


Related Discussions:- Complexity of an algorithm

How does an array differ from an ordinary variable, Normal 0 fa...

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

Recursive and iterative handling of a binary search tree, This section pres...

This section prescribes additional exercise with the recursive and iterative handling of a binary search tree. Adding to the Binary Search Tree Recursively Add implementation

Linked list, Write a program for reversing the Linked list

Write a program for reversing the Linked list

Which sorting methods sorting a list which is almost sorted, Which sorting ...

Which sorting methods would be most suitable for sorting a list which is almost sorted  Bubble Sorting method.

Tree, tree is graph or not

tree is graph or not

Write down a module to merge two linked lists, Two linked lists are having ...

Two linked lists are having information of the same type in ascending order. Write down a module to merge them to a single linked list that is sorted merge(struct node *p, stru

Complexity, Complexity : How do the resource needs of a program or algorith...

Complexity : How do the resource needs of a program or algorithm scale (the growth of resource requirements as a function of input). In other words, what happens with the performan

What is bubble sort, What is bubble sort? Bubble Sort: The basic ide...

What is bubble sort? Bubble Sort: The basic idea in bubble sort is to scan the array to be sorted sequentially various times. Every pass puts the largest element in its corr

Process of in-order traversal, In-order Traversal  This process when ex...

In-order Traversal  This process when executed iteratively also needs a stack and a Boolean to prevent the implementation from traversing any portion of a tree twice. The gener

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd