3,933 views

2 Answers

Best answer
2 votes
2 votes

If we have n symble then  we need to store each Symble in Array so 

Space complexity = O(n)

selected by
0 votes
0 votes
To obtain Huffman coding we use data structure called min heap. At the initial phase all the nodes has to be present in heap(satisfying min-heap property).

If there are n elements in tree then space complexity will be O(n) which is extra space required.

Related questions

1 votes
1 votes
3 answers
2
Parshu gate asked Nov 16, 2017
2,589 views
The following message is: GATE2018GAATTTEEEE22000011188What is the average length of bits required for encoding each letter using Huffman coding___?
2 votes
2 votes
1 answer
3
atul_21 asked Nov 13, 2017
682 views
1 votes
1 votes
1 answer
4
Anup patel asked May 21, 2017
803 views
What would be huffman coding for following : CharacterFrequencya10l15i12o3u4s13t1Explain this with suitable diagram..