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#160

Theta asymptotic notation for T (n) :

  1. A
    ?Set of functions described by: c1g(n)Set of functions described by c1g(n)>=f(n) for c1 s
  2. B
    ?Theta for T(n)is actually upper and worst case comp
  3. C
    ?Set of functions described by:
  4. D
    ?c1g(n)
Show correct answer

Correct answer: C. ?Set of functions described by:

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

The reason for introducing Sieve Technique algorithm is that it illustrates a very important special case of,

  1. A
    ?divide-and-conquer (Page 34)
  2. B
    ?decrease and conquer
  3. C
    ?greedy nature
  4. D
    ?2-dimension Maxima
Show correct answer

Correct answer: A. ?divide-and-conquer (Page 34)

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

For the heap sort we store the tree nodes in

  1. A
    ?level-order traversal (Page 40)
  2. B
    ?in-order traversal
  3. C
    ?pre-order traversal
  4. D
    ?post-order traversal
Show correct answer

Correct answer: A. ?level-order traversal (Page 40)

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

Analysis of Selection algorithm ends up with,

  1. A
    ?T(n)
  2. B
    ?T(1 / 1 + n)
  3. C
    ?T(n / 2)
  4. D
    ?T((n / 2) + n) (Page 37)
Show correct answer

Correct answer: D. ?T((n / 2) + n) (Page 37)

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

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

  1. A
    ?5
  2. B
    ?many
  3. C
    ?1 (Page 34)
  4. D
    ?few
Show correct answer

Correct answer: C. ?1 (Page 34)

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

A (an) _________ is a left-complete binary tree that conforms to the heap order

  1. A
    ?heap
  2. B
    ?binary tree
  3. C
    ?binary search tree
  4. D
    ?array
Show correct answer

Correct answer: A. ?heap

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

The sieve technique works in ___________ as follows

  1. A
    ?phases (Page 34)
  2. B
    ?numbers
  3. C
    ?integers
  4. D
    ?routines
Show correct answer

Correct answer: A. ?phases (Page 34)

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

For the sieve technique we solve the problem,

  1. A
    ?recursively (Page 34)
  2. B
    ?mathematically
  3. C
    ?precisely
  4. D
    ?accurately
Show correct answer

Correct answer: A. ?recursively (Page 34)

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

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

  1. A
    ?arithmetic (Page 41)
  2. B
    ?binary
  3. C
    ?algebraic
  4. D
    ?logarithmic
Show correct answer

Correct answer: A. ?arithmetic (Page 41)

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

The recurrence relation of Tower of Hanoi is given below T(n)={1 if n=1 and 2T(n-1) if n >1 In order to move
a tower of 5 rings from one peg to another, how many ring moves are required?

  1. A
    ?16
  2. B
    ?10
  3. C
    ?32
  4. D
    ?31
Show correct answer

Correct answer: D. ?31

Check community answers against your course notes.Question permalink ↗