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

________ problem, we want to find the best solution.

  1. A
    ?Minimization
  2. B
    ?Averaging
  3. C
    ?Optimization (Page 97)
  4. D
    ?Maximization
Show correct answer

Correct answer: C. ?Optimization (Page 97)

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

In brute force based solution of knapsack problem, we consider 2 cases, Leave object Or Take object.

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

Those problems in which Greedy finds good, but not always best is called a greedy________.

  1. A
    ?Algorithm
  2. B
    ?Solution
  3. C
    ?Heuristic (Page 97)
  4. D
    ?Result
Show correct answer

Correct answer: C. ?Heuristic (Page 97)

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

In _______ based solution of knapsack problem, we consider 2 cases, Leave object Or Take object.

  1. A
    ?Brute force
  2. B
    ?Dynamic programming
Show correct answer

Correct answer: B. ?Dynamic programming

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

The Huffman codes provide a method of _________ data efficiently.

  1. A
    ?Reading
  2. B
    ?Encoding (Page 99)
  3. C
    ?Decoding
  4. D
    ?Printing
Show correct answer

Correct answer: B. ?Encoding (Page 99)

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

Greedy algorithm can do very poorly for some problems.

  1. A
    ?True (Page 97)
  2. B
    ?False
Show correct answer

Correct answer: A. ?True (Page 97)

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

In Huffman encoding, frequency of each character can be determined by parsing the message and __________
how many times each character (or symbol) appears.

  1. A
    ?Printing
  2. B
    ?Incrementing
  3. C
    ?Counting (Page 100)
  4. D
    ?Deleting
Show correct answer

Correct answer: C. ?Counting (Page 100)

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

A greedy algorithm sometimes works well for optimization problems.

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

In DP based solution of knapsack problem, to compute entries of V we will imply a/an _______ approach.

  1. A
    ?Subjective
  2. B
    ?Inductive (Page 93)
  3. C
    ?Brute force
  4. D
    ?Combination
Show correct answer

Correct answer: B. ?Inductive (Page 93)

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

Time complexity of DP based algorithm for computing the minimum cost of chain matrix Multiplication is
________ .

  1. A
    ?log n
  2. B
    ?n
  3. C
    ?n2
  4. D
    ?n3
Show correct answer

Correct answer: D. ?n3

Check community answers against your course notes.Question permalink ↗