Hey, we don't have to give you the whole answer in one hit here :)
Exercise for the student:
- Add the data generation code for some given finite number of tosses
- Adapt the resulting code to deal with very long series
You should reply to this with your solution. For bonus marks you should compare the execution time for this technique with other techniques that have, or may be, posted. Have fun.
Perl is Huffman encoded by design.
|