I work in a school project to implement a Huffman code for a text. The first part of the course requires a frequency analysis of the text. Is there a better way than a giant switch and an array of counters to do this?
t
int[] counters for(int i = 0; i <inString.length(); i++) { switch(inString[i]) case 'A': counters[0]++; . . .
I would like to make all the alphanumeric characters and punctuation marks. I am using C ++.
source share