1.

The type of encoding where no character code is the prefix of another character code is called?(a) optimal encoding(b) prefix encoding(c) frequency encoding(d) trie encodingThis question was posed to me in a job interview.My query is from Greedy Algorithms topic in section Greedy Algorithms of Data Structures & Algorithms II

Answer»

Right answer is (B) PREFIX encoding

Explanation: Even if the CHARACTER CODES are of different lengths, the encoding where no character code is the prefix of another character code is CALLED prefix encoding.



Discussion

No Comment Found

Related InterviewSolutions