Huffman Code -

Huffman changes this by assigning a short bit sequence (like 01 ) to frequent characters and a much longer sequence (like 110101 ) to rare ones. This reduces the average number of bits needed to represent the data. How the Huffman Algorithm Works

Each symbol becomes a "leaf node" with a weight equal to its frequency. Building the Tree: huffman code

In standard systems like ASCII, every character uses the same number of bits (usually 8). This is inefficient because a rare character like 'Z' takes up the same space as the very common 'E'. Huffman changes this by assigning a short bit

The process of creating a Huffman code involves building a , a specific type of binary tree, through a "greedy" approach. a specific type of binary tree