Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2021 Set 2
Questions

Q26

MCQ2 marks, −0.67Algorithms

Consider the string abbccddeee\textrm{abbccddeee}. Each letter in the string must be assigned a binary code satisfying the following properties: For any two letters, the code assigned to one letter must not be a prefix of the code assigned to the other letter. For any two letters of the same frequency, the letter which occurs earlier in the dictionary order is assigned a code whose length is at most the length of the code assigned to the other letter. Among the set of all binary code assignments which satisfy the above two properties, what is the minimum length of the encoded string?

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.