GATE CSE Greedy Algorithms – Algorithms Practice Test | Set 1

Questions 6-10 of 100

0% completed (0/100 answered)
Your score 0/100 0 answered
Correct 0 Incorrect 0 Unanswered 100 Accuracy 0%

Question 6

MCQ · Single Correct 2 mark

What structural property is always satisfied by an optimal Huffman Tree constructed for character frequencies?

Answers for question 6

Question 7

MCQ · Single Correct 1 mark

In Huffman Coding, if a text contains n distinct characters, how many total nodes (leaf + internal) will the resulting Huffman tree contain?

Answers for question 7

Question 8

MCQ · Single Correct 2 mark

What is the time complexity of building a Huffman Tree for n distinct characters using a Min-Heap priority queue?

Answers for question 8

Question 9

MCQ · Single Correct 2 mark

In Huffman Coding, what is the length of the binary code for a character with frequency $f_{i}$ relative to total character count N?

Answers for question 9

Question 10

MCQ · Single Correct 2 mark

In Job Sequencing with Deadlines, each job i takes 1 unit of time and has profit $p_{i}$ and deadline $d_{i}$. Which greedy policy maximizes total profit?

Answers for question 10
Scroll to Top