You will need to implement a LL class that should have a template, so it can store any data type. You must use the class definition below. You can add functions to this class if you wish.

template < typename T>
class LL{
public:
//Default constructor
LL();
//Should print out that linked list
void print();
//Should return true is the linked list is empty
bool isEmpty();
//insert an element in order and does not insert an element that
//is already in the list
void insert(T x);
//returns a list of elements in order of elements that are in one
//list but not the other. Needs to run in O(n+m) where n and m
are the length for the lists.
LL< T> diffs(LL< T> & ll);
private:
struct node{
T data;
node* next;
};
node* head;
};

Test your LL class by writing a program that will first test strings. It will do this by asking the user for two files. It should read each files into a LL object word by word (case insensitive and ignoring punctuation). Once both files are read into LL objects. You should use the diffs function to find the words that are only in one file and print out that list. Now do the same test will ints. Get a seed for the user and generate 100 random ints between 0 and 100 inclusively. Then run the diffs function and print of the results.

Example output: see image.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.