The search algorithms must be implemented as a header file for use in the main file. The algorithms must operate on the text data file that will be included in the project and provided by Samy. Please make sure that you use relative filepaths for locating the data file so that the code can run on any windows computer. I am sure that there are many different ways to implement this but the only way that I can think of for having the main file run the algorithms and access the result is by having the algorithms work as objects.
Specifics:
- THe search query will be provided by the main file as a parameter (if you are following the object implementation).
- The search algorithm should provide two arrays to the main file (following the object implementation, these could be two functions that return the stored data).
- The first array should be a list of 10 websites that best match the search query, in descending order (first website should match the best to the search query).
- The second array should be a list of the % match that each respective website has with the search query, in descending order as well.
- The exact time complexity may vary but should be better than a linear search.
Note: you may modify the specifics if you can come to an agreement with Richard for how to transfer the data between the header and main file better.
The search algorithms must be implemented as a header file for use in the main file. The algorithms must operate on the text data file that will be included in the project and provided by Samy. Please make sure that you use relative filepaths for locating the data file so that the code can run on any windows computer. I am sure that there are many different ways to implement this but the only way that I can think of for having the main file run the algorithms and access the result is by having the algorithms work as objects.
Specifics:
Note: you may modify the specifics if you can come to an agreement with Richard for how to transfer the data between the header and main file better.