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 · Final-term only#170

For the Sieve Technique we take time

  1. A
    ?T(nk) ( Page 34)
  2. B
    ?T(n / 3)
  3. C
    ?n^2
  4. D
    ?n/3
Show correct answer

Correct answer: A. ?T(nk) ( Page 34)

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

single item from a larger set of _____________

  1. A
    ?n items (Page 34)
  2. B
    ?phases
  3. C
    ?pointers
  4. D
    ?vconstant
Show correct answer

Correct answer: A. ?n items (Page 34)

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

Continuing sort has time complexity of ?

  1. A
    ?O(n) Click here fir detail
  2. B
    ?O(n+k)
  3. C
    ?O(nlogn)
  4. D
    ?O(k)
Show correct answer

Correct answer: A. ?O(n) Click here fir detail

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

An in place sorting algorithm is one that uses ___ arrays for storage

  1. A
    ?Two dimensional arrays
  2. B
    ?More than one array
  3. C
    ?No Additional Array (Page 54)
  4. D
    ?None of the above
Show correct answer

Correct answer: C. ?No Additional Array (Page 54)

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

Which may be a stable sort?

  1. A
    ?Merger
  2. B
    ?Insertion
  3. C
    ? Both above (Page 54)
  4. D
    ?None of the above
Show correct answer

Correct answer: C. ? Both above (Page 54)

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

Continuation sort is suitable to sort the elements in range 1 to k

  1. A
    ?K is Large
  2. B
    ?K is not known
  3. C
    ?K may be small or large
  4. D
    ?K is small (Page 57)
Show correct answer

Correct answer: D. ?K is small (Page 57)

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

One example of in place but not stable algorithm is

  1. A
    ?Merger Sort
  2. B
    ?Quick Sort (Page 54)
  3. C
    ?Continuation Sort
  4. D
    ?Bubble Sort
Show correct answer

Correct answer: B. ?Quick Sort (Page 54)

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

Quick sort is

  1. A
    ?Stable & in place
  2. B
    ?Not stable but in place (Page 57)
  3. C
    ?Stable but not in place
  4. D
    ?Some time stable & some times in place
Show correct answer

Correct answer: B. ?Not stable but in place (Page 57)

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

Memorization is?

  1. A
    ?To store previous results for future use
  2. B
    ?To avoid this unnecessary repetitions by writing down the results of recursive calls and looking them
    up again if we need them later (Page 47)
  3. C
    ?To make the process accurate
  4. D
    ?None of the above
Show correct answer

Correct answer: B. ?To avoid this unnecessary repetitions by writing down the results of recursive calls and looking them
up again if we need them later (Page 47)

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

Sieve Technique applies to problems where we are interested in finding a single item from a larger set of
_____________

  1. A
    ?n items (Page 34)
  2. B
    ?phases
  3. C
    ?pointers
  4. D
    ?constant
Show correct answer

Correct answer: A. ?n items (Page 34)

Check community answers against your course notes.Question permalink ↗