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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started