Algorithm Complexity Mcqs

Our collections of Multiple choice questions and answers focuses on study of ” Algorithm Complexity ” in Data Structures. These questions are chosen from a collection of most authoritative and best reference books on Data Structures. Our aim is to prepare an individual for competitive exams like NTS | GAT | ECAT | Data Warehouse jobs | Data Mining | DB administration jobs Software House and Computer Programmer jobs | University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate knowledge on Algorithm Complexity comprehensively.

  1. Home
  2. »
  3. Computer Science Mcqs
  4. »
  5. Data Structures Mcqs
  6. »
  7. Algorithm Complexity Mcqs

1.
A function in which f(n) is Ω(g(n)), if there exist positive values k and c such that f(n)>=c*g(n), for all n>=k. This notation defines a lower bound for a function f(n):

Big Omega Ω (f)

Big Theta θ (f)

Big Oh O (f)

None of the above

3.
A text is made up of the characters a, b, c, d, e each occurring with the probability .12, .4, .15, .08 and .25 respectively. The optimal coding technique will have the average length of

1.78

2.03

2.15

3.01

4.
Ackerman’s function is defined on the non-negative integers as follows a (m,n) = n+1 if m=0 = a (m-1, 1) if m ≠ 0, n=0 = a (m-1, a(m, n-1)) if m ≠ 0, n ≠ 0 The value of a (1, 3) is

4

5

6

7

5.
Algorithms are at the heart of every non-trivial computer application and also a modern and active area of ____________.

Programming

Computer processing

Computer science

None of the above

6.
An algorithm is

A piece of code to be executed.

A loosely written code to make final code.

A step by step procedure to solve problem.

All of the above.

7.
An algorithm is made up of 2 modules M1&M2.; If order of M1 is f(n) & M2 is g(n) then the order of algorithm is?

F(n) + g(n)

F(n) X g(n)

Max (f(n),g(n))

Min (f(n),g(n))

8.
An algorithm is made up of 2 modules Ml and M2. If order of M1 is f(n) and M2 is g(n) then the order of the algorithm is

F (n) + g (n)

F (n) x g (n )

Min (f (n) ,g (n) )

Max (f (n) ,g (n))

9.
An algorithm is made up of two independent time complexities f (n) and g (n). Then the complexities of the algorithm is in the order of

F(n) x g(n)

Max ( f(n),g(n))

Min (f(n),g(n))

F(n) + g(n)

10.
An algorithm may have __________‘inputs’ quantities.

One or more

Zero or more

Two or more

None of the above

11.
An algorithm performs lesser number of operations when the size of input is small, but performs more operations when the size of input gets larger. State if the statement is True or False or Maybe.

True

False

Maybe

None of the above

12.
An algorithm that indicates the amount of temporary storage required for running the algorithm, i.e., the amount of memory needed by the algorithm to run to completion is termed as_____.

Big Theta θ (f)

Space complexity

Big Oh O (f)

None of the above

13.
An algorithm that requires ………………. operations to complete its task on n data elements is said to have a linear runtime.

N^3 + 9

3n^2 + 3n + 2

2n + 1

9

14.
An array of n numbers is given, where n is an even number. The maximum as well as the minimum of these n numbers needs to be determined. Which of the following is TRUE about the number of comparisons needed?

At most 1.5n-2 comparisons are needed.

At least nlog2n comparisons are needed.

At least 2n-c comparisons, for some constant c, are needed.

None of the above

15.
Apriori analysis of an algorithm assumes that −

the algorithm has been tested before in real environment.

All other factors like CPU speed are constant and have no effect on implementation.

The algorithm needs not to be practical.

None of the above.

0Shares
0
Scroll to Top