Question: WS#3: Linked Lists 1. Single Linked List ADT is implemented using the SingleLL class, provided to you on the following link: https://www.mscsnet.mu.edu/~niharika/COSC2100/MoreSourceCode/linkedLists/ Add the following
WS#3: Linked Lists
1. Single Linked List ADT is implemented using the SingleLL class, provided to you on the following link: https://www.mscsnet.mu.edu/~niharika/COSC2100/MoreSourceCode/linkedLists/
Add the following method implementation to the SingleLL class:
void addRight(T element) The method adds the element to the end of the list, i.e., on the right side of the existing list. If the original list is ABC, after the addRight(D) operation the list should be ABCD.
Solve the problem in two parts
Part I Write the algorithm with general case and special case(s). Also, draw the abstract view of the list to strengthen the algorithm.
Part II Write the complete java method implementation. You could also test the method using a driver program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
