The function ht_string2int is provided for you. You will use this function in combination with the modulo operator (%) to generate your keys. You may use the provided List implementation to handle collisions among these keys.
You will receive a single sentence, with no punctuation, and each word will be delimited by a space.
You can ignore capitalization, so that "More" != "more".
I.e. If word1 occurs x times, word2 occurs x-1 times and word3 occurs x times, then you should output:
word1:word_1_freq, word3:word_3_freq
Input: test1.in Expected output: test1.out
Input: test2.in Expected output: test2.out
Input: test3.in Expected output: test3.out
Make sure that you've compiled and tested your code on the campus unix timeshare before submitting. On the unix timeshare, put materials in a folder named hwk3 and zip it up. Note that you should not include any sample input or sample output files in your submission.
Submit on unix timeshare. Use the command: submit cse101-ap.f21 hwk3 hwk3.zip
You can submit as often as you want up until the deadline. We will only look at your most recent submission.
Last modified:
10/23/2021