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

For the heap sort we store the tree nodes in

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

Correct answer: A. ?level-order traversal

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

In which order we can sort?

  1. A
    ?increasing order only
  2. B
    ?decreasing order only
  3. C
    ?increasing order or decreasing order
  4. D
    ?both at the same time
Show correct answer

Correct answer: C. ?increasing order or decreasing order

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

The sieve technique works where we have to find _________ item(s) from a large input.

  1. A
    ?Single
  2. B
    ?Two
  3. C
    ?Three
  4. D
    ?Similar
Show correct answer

Correct answer: A. ?Single

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

Question No: 55 ( Marks: 1 ) - Please choose one
The analysis of Selection algorithm shows the total running time is indeed ________in n,

  1. A
    ?arithmetic
  2. B
    ?geometric
  3. C
    ?linear
  4. D
    ?orthogona
Show correct answer

Correct answer: C. ?linear

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

Algorithm analysts know for sure about efficient solutions for NP-complete problems.

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

In plane sweep approach, a vertical line is swept across the 2d-plane and _______structure is used for holding
the maximal points lying to the left of the sweep line.

  1. A
    ?Array
  2. B
    ?Queue
  3. C
    ?Stack
  4. D
    ?Tree
Show correct answer

Correct answer: C. ?Stack

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

The function f(n)=n(logn+1)/2 is asymptotically equivalent to nlog n. Here Lower Bound means function f(n)
grows asymptotically at ____________ as fast as nlog n.

  1. A
    ?Normal
  2. B
    ?Least
  3. C
    ?Most
  4. D
    ?All
Show correct answer

Correct answer: B. ?Least

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

Brute-force algorithm for 2D-Maxima is operated by comparing ________ pairs of points.

  1. A
    ?Two
  2. B
    ?Some
  3. C
    ?Most
  4. D
    ?All
Show correct answer

Correct answer: D. ?All

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

Before sweeping a vertical line in plane sweep approach, in start sorting of the points is done in increasing
order of their _______coordinates.

  1. A
    ?X
  2. B
    ?Y
  3. C
    ?Z
  4. D
    ?X & Y
Show correct answer

Correct answer: A. ?X

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

For the worst-case running time analysis, the nested loop structure containing one “for” and one “while” loop,
might be expressed as a pair of _________nested summations.

  1. A
    ?1
  2. B
    ?2
  3. C
    ?3
  4. D
    ?4
Show correct answer

Correct answer: B. ?2

Check community answers against your course notes.Question permalink ↗