CSCI 3333 Homework TT1: Trendtracker
The Twitter website has become a de facto first source for many important events in the last decade.
Twitter’s hashtag feature lets users tag tweets with single words or phrases (e.g. #superbowl, #algorithms,
or #vacaciones). Popular or trending hashtags indicate strong shared interest by many people in a topic,
and tracking these trends is of interest to businesses, news outlets, and researchers.
string hashtag int pop
Figure 1: Representing hashtags and their popularities using a vector-based data structure.
In this homework, you’ll implement an vector-based data structure that tracks information about a collection
of hashtags, including which are most popular, i.e. are trending.
The following files have been given to you:
1. A C++ header file (trendtracker.h) declaring the Trendtracker class.
2. A C++ source file (main.cpp) containing a main function with tests.
3. A text file (common.txt) containing 3612 common English words.2
Download the files at http://andrewwinslow.com/3333/hwTT1/ Create a new C++ source file named
trendtracker.cpp that implements the Trendtracker class, so that trendtracker.cpp and the provided files compile into a program that runs with no failed tests. Submit the source file trendtracker.cpp.
3 Submission and Grading
Submit the aforementioned source file(s) via Blackboard as attached file(s). In the case of multiple submissions, the last submission before the deadline is graded.
For grading, each submission is compiled with the provided files and run. Submissions that do not run
to completion (i.e. fail to print “Assignment complete.”) receive no credit. Submissions that take an
unreasonable amount of time (e.g. more than a minute or so) to run and do not meet the asymptotic
efficiency requirements receive no credit. All other submissions receive full credit.
See the course late work policy for information about receiving partial credit for late submissions.
1The trending topics displayed on Twitter’s website are actually chosen using more complex algorithm.