ishu9bansal / ideone

useful pieces of codes
1 stars 1 forks source link

Improve time complexity by using queues instead of map #1

Closed ishu9bansal closed 4 years ago

ishu9bansal commented 4 years ago

https://github.com/ishu9bansal/ideone/blob/c5628fb7a146cb07fb34fba5525e10c615c04f3a/huffman_coding/7BBdMz.cpp#L15-L18

Using queues in correct fashion will also lead to less variance in the encodings.