In this assignment, you implement three recursive methods. The methods are unrelated, and you should put them in different classes.
You should also have a driver program to allow the user to test printing different numbers, and printing the resulting string.
This function grows very rapidly with its input values. You should test with small values such as ack(0, 0) computing 1, ack(1, 3) computing 5, ack(2, 3) computing 9.
You must also provide a driver program for this method that allows the user to test calling with different sets of inputs.
This method should be embedded in the LinkedListRec.java code.
The main method of the LinkedListRec.java class must be changed to create a linked list containing all the arguments on the command line except for the first argument.
After creating the linked list, the main method should run this duplicate method with the first argument and the linked list, and print the result.
Given the command line would be "foo hello foo world bar foo baz", the first "foo" is the value to duplicate, and the other arguments are the list that main must create before calling the duplicate method. So the duplicate method is called with two arguments, the string "foo", and the list "hello", "foo", "world", "bar", "foo", "baz". The result should be the list "hello", "foo", "foo", "world", "bar", "foo", "foo", "baz".
Note: you are allowed to use loops in the driver method. For example, for the last problem, you are allowed to use a loop to create the linked list to be duplicated. But your solution to the problem must use recursion.