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

Explain avl tree, AVL tree An AVL tree is a binary search tree in which...

AVL tree An AVL tree is a binary search tree in which the height of the left and right subtree of the root vary by at most 1 and in which the left and right subtrees are again

Representing sparse matrix in memory using array, Q. What do you understand...

Q. What do you understand by the term sparse matrix? How sparse matrix is stored in the memory of a computer? Write down the function to find out the transpose of a sparse matrix u

Deletion of any element from the queue, Program segment for the deletion of...

Program segment for the deletion of any element from the queue delmq(i)  /* Delete any element from queue i */ { int i,x; if ( front[i] == rear[i]) printf("Queue is

Splay trees, Addition of new records in a Binary tree structure always occu...

Addition of new records in a Binary tree structure always occurs as leaf nodes, which are further away from the root node making their access slower. If this new record is to be ac

ALGORITHMS, WRITE AN ALGORITHM TO READ TWO NUMBERS AND PRINT THE LOWER VALU...

WRITE AN ALGORITHM TO READ TWO NUMBERS AND PRINT THE LOWER VALUE

Explain about the doubly linked list with neat diagram, Problem 1. Expl...

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

Hash tables, Q. Explain the Hash Tables, Hash function and Hashing Techniqu...

Q. Explain the Hash Tables, Hash function and Hashing Techniques properly?             A n s . H as h Table is explained as follows : A hash table is a data struc

Definition of algorithm, Definition of Algorithm Algorithm must have th...

Definition of Algorithm Algorithm must have the following five characteristic features: 1.      Input 2.      Output 3.      Definiteness 4.      Effectiveness 5

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