I need to read in a list of words (don't know which words or how many so it needs to be dynamic) and calculate the frequency of each. I was thinking of either doing a balanced BST of records or a hash table of records. Each record storing the word and the number of occurrences. Also a global variable storing the total number of words to calculate the frequency with.
Any better suggestions than mine. I am thinking the hash table would be best but I have never implemented one before.
2007-02-07
03:52:41
·
5 answers
·
asked by
Kirstin
2
in
Computers & Internet
➔ Programming & Design
Is a dynamic array the same as a linked list? If so would a binary search tree not be more efficient?
2007-02-07
04:05:58 ·
update #1
By calculate the frequency I mean calculate the percentage of each. So I need to store the frequency of each word and the total number of words.
2007-02-07
04:08:10 ·
update #2