Huffman Code
Entropy: define the minimum of expected code length.
high entropy -> uniform tree, unpredictable; low entropy -> skewed tree, predictable
Heap: complete binary tree. Max-heap, parents always bigger than children.
time complexity of insert() in heap: O(logN), bubble up the child node
time complexity of remove() in heap: O(logN), the last node move to root, then trickle down to the right place.
prefix code: no symbol’s codeword is a prefix of another