Hello everyone,
I have a project from data structers and algorithms. However, I have some problems about the project. My project is about find the most frequent word in .csv file. Also, I don't know how I can do it. Please help me.
Note:
Using Vector library, algorithm library, STL library and iterator are forbidden.
I can only use hash algorithm,serch algorithm ,sorting, linkdelist, arraylist and hashing.
This is a surprisingly common problem. It's tricky because at first you're looking up words by value (to increment their frequency count) and then you want to look them up by frequency (to find the most frequent one(s)). I use this UNIX command line all the time at work to sort lines in a text file by frequency: sort | uniq -c | sort -n
Do you know how to implement a linked list or dynamic array?
Using one of the two with a struct (first answer of dhayden) seems the easiest option.
Using a hashtable seems more complicated unless you have learned it already.