The method: Given a string of, say, length 8, form all 8 rotations of it, and then sort them lexicographically. Then form the 8 letter...
The idea: First assign a number to all the letters of the alphabet. Say A is 41, B is 42, etc. Now let’s say we’re compressing the...
The problem with run length encoding was that our chunk size (e.g. 4 bits) is fixed. This is nonoptimal. With Huffman encoding, we can...
We have a large string (e.g. text file). Usually, ASCII is not the optimal space allocation for the file. There are various schemes for...
We have a string of length \(N\), and wish to find an \(M\) character string in it. Brute Force Keep moving through the string till the...