Modify the alogorithm implementation
Budget: ₹600 – ₹1,500 INR
I had already implemented the algorithm which is similar to huffman but I didn't follow some conditions. Your task is to understand the conditions and modify the code accordingly. I will give you the expected output and all the code.