Question: Using C++ Programming Language: Given a structure of a singularly linked list where each node has the structure below and, define an overloaded addition operato
Using C++ Programming Language: Given a structure of a singularly linked list where each node has the structure below and, define an overloaded addition operator which will take two pointers to LListNode objects which are the heads of SORTED (you do not need to sort them, they are already sorted) lists and will return the head pointer to a newly created list which contains all of the nodes of both of the lists.
- You should not assume that there are ANY functions in the LList class. You may write helper functions however your overall solution must run in Theta(N) time.
templateclass LListNode { public: T data; LListNode * next; };
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
