Question: Hi, I am taking a java class and i was given this question. can any please help? Design, specify, and implement a class named Node

Hi, I am taking a java class and i was given this question. can any please help?

Design, specify, and implement a class named "Node" or "IntNode" which will define a linked list of integers, and provide the following methods for the class:

1- A new static method with one parameter which is a head node for a linked list of integers, the method should create a new linked list which is equivalent to the original list of integers but with all repetitions removed, the method's return value is a head reference for the new list.

2- Write a method with three parameters, the first parameter is a head reference for a linked list of integers, and the next two parameters are integers x and y. The method should print out a line containing all integers in the list that are between the first occurrence of x and the first occurrence of y.

3- Write a method with one parameter that is a head reference for a linked list of integers, The method should create a new list that has the same elements as the original list but in reverse order, the method should return a head reference for the new list.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!