Thursday, August 20, 2009

TWO MARKS QUESTIONS AND ANSWERS

DATA STRUCTURES


Previous Next



1.What is an Algorithm?
An algorithm is clearly specified set of simple instructions to be followed to solve a problem. The algorithm forms a base for program.


2.What are the properties of an Algorithm?
_ Takes zero or more inputs
_ Results in one or more outputs
_ All operations are carried out in a finite time
_ Efficient and flexible
_ Should be concise and compact to facilitate verification of their
correctness.


3.Define Program?
It is an instruction and it is written according to the instructions, which is given in the algorithm.


4. What is Complexity analysis?
It is the analysis of the amount of memory and time an algorithm requires to completion.
There are two types of Complexity
1. Space Complexity

2. Time Complexity


5. Explain the performance analysis of the algorithm?
The analysis of the performance of an algorithm based on specification is called performance analysis. It is loosely divided into
a. Priori estimates
b. Posterior Testing


6. Explain Space complexity?
Space complexity of an algorithm is the amount of memory it needs to run to completion.


7. Explain Time complexity?
Time complexity is the amount of computer time an algorithm requires to run to completion.


8. List out the components that are used for space complexity?
a. Instruction Space
b. Environment Stack
c. Data Space.


9. What do asymptotic notation means?
Asymptotic notations are terminology that is introduced to enable us to make meaningful statements about the time and space complexity of an algorithm.
The different notations are
Big – Oh notation
Omega notation
Theta notation.


10. Define Efficiency of an algorithm?
It denotes the rate at which an algorithm solves a problem of size n. It is measured by the amount of resources it uses, the time and the space.


Previous Next

No comments:

Post a Comment