<< split from http://cboard.cprogramming.com/c-pro...-%2A%2Att.html >>
To analysing a string, then finding the char whose counts of appearing in string is max.
how to solve this question?
for example:
I now think two method.Code:char *string = "ab---ebbbe"; the appearing counts of char 'b' is max. It is 3.
one is :
the other isCode:sort(string); statisticalCountofChar(string);
is there even more better method to solve this question?Code:char *individualofChar; for ( string ) { for ( *individualofChar ) { caculateCountofChar(); } }
how to solve this question using HASHING TABLE? how to design hashing function ?