Question: public String recReverse ToString() is a RECURSIVE method with the same functionality - creates a string that holds all the integers in the list in


public String recReverse ToString() is a RECURSIVE method with the same functionality - creates a string that holds all the integers in the list in reverse order. Requirements: o DO NOT reverse list, just traverse it and create a string that holds the elements in reverse order. o Your solution must be O( N). o This solution must be recursive. Copy Constructor Method Continue working with the same List.java class. Add a copy constructor to create a deep copy of the list. smallestFirst() Method Continue working with the same List.java class. Add void smallestFirst () method that moves the node with the smallest integer in the list to become the first node.reverse() Method for List class Start with classes List.java and ListDemo.java that can be found next to this assignment. Add a new public method void reverse () to the class. The method must reverse the linked list data structure. You can implement either iterative or recursive solution. Test your method in ListDemo.java. Make sure it works for empty list as well as with a list with just one element. Requirement: Complexity of your solution must be O(N). reverseToString() and recReverseToString() Continue working with the same List.java class. Add two more methods to the class: . public String reverseToString() method creates a string that holds all the integers in the list in reverse order. Requirements: o DO NOT reverse list, just traverse it and create a string that holds the elements in reverse order. o Your solution must be O(N). o This solution must be iterative
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
