Let’s use the next probabilistic model:
| Symbol | Count |
| A | 15 |
| B | 7 |
| C | 6 |
| D | 6 |
| E | 5 |
First iteration:
| Symbol | Count | Bits |
| A | 15 | 0 |
| B | 7 | 0 |
| C | 6 | 1 |
| D | 6 | 1 |
| E | 5 | 1 |
Second iteration:
| Symbol | Count | Bits |
| A | 15 | 00 |
| B | 7 | 01 |
| C | 6 | 10 |
| D | 6 | 11 |
| E | 5 | 11 |
Third iteration:
| Symbol | Count | Bits |
| A | 15 | 00 |
| B | 7 | 01 |
| C | 6 | 10 |
| D | 6 | 110 |
| E | 5 | 111 |