Your cart is currently empty!
Please e-mail me if you don’t see your e-mail in the list and do it from your USC e-mail. Also, include your GitHub Username. Description: You will code Warshall’s, Floyd’s and then use sorting (std::sort), std::map (self-balancing tree), and unordered_map (hash table) to tell if an input vector of strings contains a pair…
Please e-mail me if you don’t see your e-mail in the list and do it from your USC e-mail. Also, include your GitHub Username.
Description:
You will code Warshall’s, Floyd’s and then use sorting (std::sort), std::map (self-balancing tree), and unordered_map (hash table) to tell if an input vector of strings contains a pair of anagrams, returning the pair.
Please read, or at least skim: Segfault troubleshooting strategies
SSH Instructions:
In Putty/MobaXTerm/WinSCP/Bitvise/… or just plain SSH to l-1d43-XY.cse.sc.edu on port 222
If you’re off campus, you will need to have Duo 2 Factor Authentication setup.
From a non-lab Linux machine can ssh -p 222 <username>@l-1d43-XY.cse.sc.edu
Instructions:
Go to this URL: https://classroom.github.com/a/BRKauEJp skip the e-mail selection… your GitHub and school e-mail addresses should be associate by now) Accept the Assignment
Follow the second link to the assignment.
Click on “Clone or download”
Copy the link
(if you’re remoting into the Linux labs, login and then switch to your ssh connection here) <navigate to wherever you want to work>
git clone <the url>
The assignment repositories are private, so you’ll need to login.
git config –global –edit and edit the file (you probably did this already)
You can run the scoring function that builds and runs the tests for you and prints the score for you by running the following command ( cd into the cloned directory first):
python3 score.py
You should see, “ SCORE= 0 ” before you get any work done.
You can run the unit tests directly without using the score function (not necessary) with the following command, also from the downloaded directory.
cd program-_-<username> (written generically)
mkdir build && cd build
cmake ..
make
./runUnitTests
Do a make clean if it seems to be acting “oddly”.
Graph.h
Implement Warshall’s and Floyd’s (all your code goes in Graph.h)
Things to note:
Floyd’s – All Pairs Shortest Paths
SBTreeHash.h
Input to all three functions is a vector<string>.
You need to return an ana_result struct which will have its found field set to false if there are no anagrams in the input and true otherwise. If an anagram is found, then the s1 and s2 fields should be set to the strings. For anagram checking, you may just sort the string’s characters and compare for equality (assumption is that there are many short strings).
Note that, for time comparison reasons, there are 4 tests all put together, the first of which generates the problems and the next three which test each approach. If the corresponding test passed, you get that 20 points… we have to look at the code anyway, so the score will be adjusted.
anyAnagramsSorting()
anyAnagramsMap()
anyAnagramsHash()
Committing (backup and submission)
When I’m done or want to backup ( git is for version control ) I just git add .
git commit -m “<some message>” // “final submission” makes sense if you’re done git push origin master
We will grade the last submission up to the deadline (the very last submission until we won’t accept it anymore, possibly with a late penalty).
No need to submit code to dropbox.