1. Write a method with one parameter that is a head reference for a linked list of integers. The method creates a new list that has the same elements as the original list but in the reverse order. The...


1. Write a method with one parameter that is a head reference for a linked list of integers. The method creates a new list that has the same elements as the original list but in the reverse order. The method returns a head reference for the new list.


2. Write a method that has two linked list head references as parameters. Assume that linked lists contain integer data, and on each list, every element is less than the next element on the every same list. The method should create a new linked list that contains all the elements on both lists, and the new linked list should also be ordered (so that every element is less than the next element in the list). The new linked list should not eliminate duplicate elements(i.e., if the same element appears in both input lists, then two copies are placed in the newly constructed linked list). The method should return a head reference for the newly constructed linked list.





Dec 02, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here