Thursday , 21 November 2024

CS502 Latest solved MCQs by M. Zeeshan and Arslan Ali

1. In which order we can sort?

•  increasing order only           •  decreasing order only

•  increasing order or decreasing order              •  both at the same time

2.  heap is a left-complete binary tree that conforms to the ___________

•  increasing order only      •  decreasing order only   •  heap order   •  (log n) order

3. In the analysis of Selection algorithm, we make a number of passes, in fact it could be

as many as,

•  T(n)            •  T(n / 2)             •  log n             •  n / 2 + n / 4

4. How much time merge sort takes for an array of numbers?

•  T(n^2)           •  T(n)        •  T( log n)             •  T(n log n)

5. One of the clever aspects of heaps is that they can be stored in arrays without using any

_______________.

•  pointers                         •  constants                 •  variables               •  functions

6.  the analysis of Selection algorithm, we eliminate a constant fraction of the array with

each phase; we get the convergent _______________ series in the analysis


•  linear                •  arithmetic                       •  geometric                    •  exponent

7:. Sieve Technique applies to problems where we are interested in finding a single item

from a larger set of _____________

•  n items                             •  phases                •  pointers                    •  constant

8.  The sieve technique works in ___________ as follows

•  phases                   •  numbers                  •  integers                     •  routines

9. For the heap sort, access to nodes involves simple _______________ operations.

•  arithmetic                    •  binary                     •  algebraic                    •  logarithmic

10. The analysis of Selection algorithm shows the total running time is indeed

________in n,

•  arithmetic                   •  geometric                  •  linear                 •  orthogonal

11. Divide-and-conquer as breaking the problem into a small number of

•  pivot                      •  Sieve                  •  smaller sub problems               •  Selection

12. Slow sorting algorithms run in,

•  T(n^2)                   •  T(n)                      •  T( log n)                     •  T(n log n)

13. A heap is a left-complete binary tree that conforms to the

•  increasing order only            •  decreasing order only           •  heap order          •  (log n) order

14. For the heap sort we store the tree nodes in

•  level-order traversal   •  in-order traversal   •  pre-order traversal       •  post-order traversal

15.  The reason for introducing Sieve Technique algorithm is that it illustrates a very

important special case of, 

•  divide-and-conquer,   •  decrease and conquer       •  greedy nature        •  2-dimension Maxima

16. We do sorting to,   Select correct option:

•  keep elements in random positions    •  keep the algorithm run in linear order

•  keep the algorithm run in (log n) order   •  keep elements in increasing or decreasing order

17. Sorting is one of the few problems where provable ________ bonds exits on how fa

we can sort,              Select correct option:

•  upper            •  lower      •  average  •  log n

For the heap sort we store the tree nodes in        Select correct option:

•  level-order traversal    •  in-order traversal       •  pre-order traversal         •  post-order traversal

20: In Sieve Technique we do not know which item is of interest   Select correct option:

•  True           •  False

21: Slow sorting algorithms run in,

•  T(n^2)                 •  T(n)                •  T( log n)       •  T(n log n)

22: Divide-and-conquer as breaking the problem into a small number of

•  pivot            •  Sieve            •  smaller sub problems      •  Selection

23: For the sieve technique we solve the problem,

•  recursively             •  mathematically               •  precisely               •  accurately

24: we do sorting to,

•  keep elements in random positions        •  keep the algorithm run in linear order

•  keep the algorithm run in (log n) order  •  keep elements in increasing or decreasing order

25: The reason for introducing Sieve Technique algorithm is that it illustrates a very

important special case of,

•  divide-and-conquer  •  decrease and conquer   •  greedy nature    •  2-dimension Maxima

26: In Sieve Technique we do    not know which item is of interest

•  true          •  false

27: In the analysis of

Selection algorithm, we make a number of passes, in fact it could be as many as,

•  T(n)           •  T(n / 2)                •  log n               •  n / 2 + n / 4

28:  Divide-and-conquer as breaking the problem into a small number of

•  pivot           •  Sieve                  •  smaller sub problems                •  Selection

29: A heap is a left-complete binary tree that conforms to the ___________

•  increasing order only      •  decreasing order only            •  heap order           •  (log n) order

30: Slow sorting algorithms run in,

•  T(n^2)        •  T(n)                  •  T( log n)          •  T(n log n) 

31: One of the clever aspects of heaps is that they can be stored in arrays without using

any _______________.


•  pointers         •  constants            •  variables           •  functions

 

32:  Sorting is one of the few problems where provable ________ bonds exits on how fast

we can sort,          •  upper       •  lower       •  average         •  log n

33: For the sieve technique we solve the problem,

•  mathematically            •  precisely              •  accurately                •  recursively

34: Sieve Technique can be applied to selection problem?

•  True          •  False

37:  Heaps can be stored in arrays without using any pointers; this is due to the

____________ nature of the binary tree,

•  left-complete            •  right-complete                •  tree nodes                 •  tree leaves 

38: How many elements do we eliminate in each time for the Analysis of Selection

algorithm?

•  n / 2 elements          •  (n / 2) + n elements             •  n / 4 elements           •  2 n elements

39:  We do sorting to,

•  keep elements in random positions  •  keep the algorithm run in linear order

•  keep the algorithm run in (log n) order  •  keep elements in increasing or decreasing order 

40: In which order we can sort?

•  increasing order only         •  decreasing order only

•  increasing order or decreasing order        •  both at the same time

41: : In the analysis of Selection algorithm, we make a number of passes, in fact it could

be as many as, •  T(n)                   •  T(n / 2)                 •  log n                 •  n / 2 + n / 4

42: The sieve technique is a special case, where the number of sub problems is  just

•  5            •  Many                      •  1                     •  few

Check Also

CS101 100% Solved MCQS for Final term Papers by Arslan Ali

CS101 105 Important MCQ’s Solved   Question No: 1    ( Marks: 1 )    – Please …

Leave a Reply

Your email address will not be published. Required fields are marked *

*