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

A point p in 2-dimensional space is usually given by its integer coordinate(s)____________

  1. A
    ?p.x only p.y
  2. B
    ?only p.x & p.z
  3. C
    ? p.x & p.y
Show correct answer

Correct answer: C. ? p.x & p.y

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

In Heap Sort algorithm, the maximum levels an element can move upward is _________

  1. A
    ?Theta (log n) (Page 43)
  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) (Page 43)

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

Floor and ceiling are ____________ to calculate while analyzing algorithms.

  1. A
    ?Very easy
  2. B
    ?Usually considered difficult
Show correct answer

Correct answer: B. ?Usually considered difficult

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

_________ is one of the few problems, where provable lower bounds exist on how fast we can sort.

  1. A
    ?Searching
  2. B
    ?Sorting (Page )
  3. C
    ?Both Searching & Sorting
  4. D
    ?Graphing
Show correct answer

Correct answer: B. ?Sorting (Page )

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

A RAM is an idealized algorithm with takes an infinitely large random-access memory.

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

Upper bound requires that there exist positive constants c2 and n0 such that f(n) ____ c2n for all n <= n0(ye
question ghalat lag raha hai mujhae

  1. A
    ?Less than
  2. B
    ?Equal to or Less than
  3. C
    ?Equal or Greater than
  4. D
    ?Greater than
Show correct answer

Correct answer: B. ?Equal to or Less than

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

In Heap Sort algorithm, if heap property is violated _________

  1. A
    ?We call Build heap procedure
  2. B
    ?We call Heapify procedure
  3. C
    ?We ignore
  4. D
    ?Heap property can never be violated
Show correct answer

Correct answer: B. ?We call Heapify procedure

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

In ____________ we have to find rank of an element from given input.

  1. A
    ?Merge sort algorithm
  2. B
    ?Selection problem
  3. C
    ?Brute force technique
  4. D
    ?Plane Sweep algorithm
Show correct answer

Correct answer: B. ?Selection problem

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

A point p in 2-dimensional space is usually given by its integer coordinate(s)____________

  1. A
    ? p.x only
  2. B
    ? p.y only
  3. C
    ? p.x & p.z
  4. D
    ? p.x & p.y
Show correct answer

Correct answer: D. ? p.x & p.y

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

Quick sort is based on divide and conquer paradigm; we divide the problem on base of pivot element and:

  1. A
    ?There is explicit combine process as well to conquer the solution.
  2. B
    ?No work is needed to combine the sub-arrays, the array is already sorted
  3. C
    ?Merging the sub arrays
  4. D
    ?None of above.
Show correct answer

Correct answer: D. ?None of above.

Check community answers against your course notes.Question permalink ↗