Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(Java) Given a pointer to a singly linked list write a routine which will create 2 new lists, in addition to the original. The 1st
(Java)
Given a pointer to a singly linked list write a routine which will create 2 new lists, in addition to the original. The 1st new list should contain every 3rd node starting from the second node in the list and the second new list should contain every 3rd node from the 3rd node in the list. This means when you are done you will have 3 lists the original list which will contain (keep) nodes 1 and 4 and 7 etc from the original list, the 2nd list will contain nodes 2 and 5 and 8 etc. and the 3rd list will contain nodes 3 and 6 and 9 etc from the original list. When you are finished you will have 3 separate singly linked listsStep 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