A certain data compression technique involves creating a table of variable-length binary codes where one or more binary digits are used to represent a single letter of an alphabet. Usually, letters that occur most frequently in words
generated using this alphabet will have shorter binary codes than those used less frequently. For example, in an alphabet consisting of the letters A through Z, in general the letter E appears in more words than the letter Q;
therefore it would be expected that E would have a shorter binary code than does Q.
Given a sample string using at least one of each letter in an alphabet, along with the entire binary encoding of that sample string, you should be able to generate at least one binary code table for each letter in the alphabet. For
example, consider the sample string: "CAB" which contains each letter of the alphabet {A,B,C}. If the binary encoding of "CAB" is "01011" then the (only) binary code table is:
C = 0
A = 10
B = 11
The binary codes for each character are prefix codes in that no code in the set can be the initial binary string for any other code (so A = 01, B = 011 would not be allowed). For this problem, you will write a program that determines
binary code tables for sample strings and their binary encodings. If there is a single binary code table solution, then you will print it out (sorted). If more than one binary code table can be generated from the given set of data, you
will print "MULTIPLE TABLES". Note: For a given alphabet, the entire code space will be used; that is, there will be no unused codes.