YOUR SUBJECT CS502 Fundamentals of AlgorithmsChange subject ↗
PRACTICE AT YOUR OWN PACE

CS502 practice questions

Think through the options before revealing the answer. Use the term filter to focus your revision.

260 questions
CS502 · Midterm#260

The running time of an algorithm would not depend upon the optimization by the compiler but that of an implementation of the algorithm would depend on it.

  1. A
    True
  2. B
    False
Show correct answer

Correct answer: A. True

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#259

If the indices passed to merge sort algorithm are ________,then this means that there is only one element to
sort.

  1. A
    ?Small
  2. B
    ?Large
  3. C
    ?Equal
  4. D
    ?Not Equal
Show correct answer

Correct answer: C. ?Equal

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#258

In pseudo code, the level of details depends on intended audience of the algorithm.

  1. A
    ?True
  2. B
    ?False
Show correct answer

Correct answer: A. ?True

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#257

While solving Selection problem, in Sieve technique we partition input data __________

  1. A
    ?In increasing order
  2. B
    ?In decreasing order
  3. C
    ?According to Pivot
  4. D
    ?Randomly
Show correct answer

Correct answer: C. ?According to Pivot

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#256

In Sieve Technique, we know the item of interest.

  1. A
    ?True
  2. B
    ?False
Show correct answer

Correct answer: B. ?False

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#255

In Heap Sort algorithm, we build _______ for ascending sort.

  1. A
    ?Max heap
  2. B
    ?Min heap
Show correct answer

Correct answer: A. ?Max heap

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#254

Quick sort is best from the perspective of Locality of reference.

  1. A
    ?True
  2. B
    ?False
Show correct answer

Correct answer: A. ?True

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#253

While Sorting, the ordered domain means for any two input elements x and y _________ satisfies only.

  1. A
    ?x < y
  2. B
    ?x > y
  3. C
    ?x = y
  4. D
    ?All of the above
Show correct answer

Correct answer: D. ?All of the above

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#252

Algorithm is a mathematical entity, which is independent of a specific machine and operating system.

  1. A
    ?True
  2. B
    ?False
Show correct answer

Correct answer: B. ?False

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#251

In Heap Sort algorithm, the total running time for Heapify procedure is ____________

  1. A
    ? Theta (log n)
  2. B
    ?Order (log n)
  3. C
    ?Omega (log n)
  4. D
    ?O (1) i.e. Constant time
Show correct answer

Correct answer: A. ? Theta (log n)

Check community answers against your course notes.Question permalink ↗