2.You are given the following problem:
Find within a text (given as a text file) the most occurrent word.
a.To this end, design an algorithm that takes as input a text, and prints the most occurrent word, along with its number of occurrences.
How would I go about solving this? I was considering a hash table using chaining and a counter but it might get complex and inefficient. I was also considering using some sort of binary search tree. Anyhow, I am not looking for a solution but rather some opinions and ideas. Thanks
2007-01-21
16:48:43
·
3 answers
·
asked by
procomp9
1
in
Computers & Internet
➔ Programming & Design