Word Frequency Statistics in C (not C++)
问题 Given a string consists of words separated by a single white space, print out the words in descending order sorted by the number of times they appear in the string. For example an input string of “ab bc bc” would generate the following output: bc : 2 ab : 1 The problem would be easily resolved if C++ data structures, like a map, is used. But if the problem could only be solved in plain old C, it looks much harder. What kind of data structures and algorithms shall I use here? Please be as