Min Heap implementation and Huffman Encoding