Algorithms MCQ Questions And Answers

This section focuses on "Algorithms" in Data Structures. These Multiple Choice Questions (MCQ) should be practiced to improve the Data Structure skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.

1. ___________ is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to get the desired output.

A. Code
B. Algorithm
C. Program
D. All of the above

View Answer


2. Which of the following are characteristics of an algorithm?

A. Algorithm should be clear
B. Algorithm should be unambiguous
C. Algorithms must terminate after a finite number of steps
D. All of the above

View Answer


3. Not all procedures can be called an algorithm

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


4. An algorithm should have _______ well-defined inputs.

A. 0
B. 1
C. 0 or more
D. 1 or more

View Answer


5. An algorithm should have __________ well-defined outputs

A. 0
B. 1
C. 0 or more
D. 1 or more

View Answer


6. Which of the following is a theoretical analysis of an algorithm?

A. Posterior Analysis
B. Priori Analysis
C. Simple Analysis
D. Preori Analysis

View Answer


7. _________ is measured by counting the number of key operations such as comparisons in the sorting algorithm.

A. Space
B. Lines
C. Time
D. None of the above

View Answer


8. The complexity of an algorithm f(n) gives the running time and/or the storage space required by the algorithm in terms of n as the size of input data.

A. Yes
B. No
C. Can be yes or no
D. Can not say

View Answer


9. The space required by an algorithm is equal to the sum of ________ components.

A. 1
B. 2
C. 3
D. 4

View Answer


10. Space complexity S(P) of any algorithm P is S(P) = C + SP(I), where C is the?

A. fixed part
B. variable part
C. space complexity
D. None of the above

View Answer





Discussion



* You must be logged in to add comment.