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

Huffman algorithm uses a greedy approach to generate an antefix code T that minimizes the expected length B
(T) of the encoded string.

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

The greedy part of the Huffman encoding algorithm is to first find two nodes with character frequency

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

The greedy part of the Huffman encoding algorithm is to first find two nodes with smallest frequency.

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

Correct answer: A. ? ?True (Page 100)

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

Using ASCII standard the string abacdaacac will be encoded with 32 bytes

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

Using ASCII standard the string abacdaacac will be encoded with 100 bits.

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

Using ASCII standard the string abacdaacac will be encoded with 320 bits.

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

Using ASCII standard the string abacdaacac will be encoded with 160 bits.

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

Using ASCII standard the string abacdaacac will be encoded with __________ bits.

  1. A
    ? ?80 (Page 99)
  2. B
    ? ?160
  3. C
    ? ?320
  4. D
    ? ?100
Show correct answer

Correct answer: A. ? ?80 (Page 99)

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

The Huffman codes provide a method of encoding data inefficiently when coded using ASCII standard.

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

Non-optimal or greedy algorithm for money change takes____________

  1. A
    ? ?O(k) (Page 99)
  2. B
    ? ?O(kN)
  3. C
    ? ?O(2k)
  4. D
    ? ?O(N)
Show correct answer

Correct answer: A. ? ?O(k) (Page 99)

Check community answers against your course notes.Question permalink ↗