CS 502 Algorightm Solved MCQ's for mid, final term and quizes, free download, Prepare this for exams and good marks. Do not copy to other websites..




16. Best and worst case times of an algorithm may be same.
• True
• False

17. Can an adjacency matrix for a directed graph ever not be square in shape?
• Yes
• No

18. If an algorithm has a complexity of 2n2+ 4n + 3 for some model of computation (some set of assumptions) and some complexity measures (such as number of comparison
operations) we could say that it has complexity
(a) O(log2n)
(b) O(n2)
(c) O(2 + 4 + 3)
(d) all of the above
(e) none of the above




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 fast 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

18: For the Sieve Technique we take time
• T(nk)
• T(n / 3)
• n^2
• n/3
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

35: How much time merge sort takes for an array of numbers?

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

36; : For the Sieve Technique we take time

• T(nk)
• T(n / 3)
• n^2
• n/3

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 http://ping.fm/GmUfK
0 Responses