Dear
Java Community
I kindly want to inquire, if I briefly described a couple of efficient data structures and how they implement a Huffman Tree correctly they are the following:
1- Priority queue
The keys of the priority queue can be the frequencies and the letters used can be the values. The letters will be retrieved from highest to lowest frequencies.
2- Min Heap
Since, building a Huffman tree is bottom-up a min heap can be used to store the values and their encoding, and retrieve the smallest letter frequency easily.
3- HashMap
This data structure is efficient in accessing items in constant time. The keys can be the letters frequencies and values are the letters.
Any help is much appreciated. Thank you guys for helping me in my previous posts much appreciated.