1. Write a method that starts with a single linked list of integers and a special value called the splitting value. The elements of the list are in no particular order. The method di- the vides the nodes into two linked lists: one containing all the nodes that contain an element less than the splitting value and one that contains all the other nodes. If the original linked list had any repeated integers (i.e., any two or more nodes with the same element in them), then the new linked list that has this element should have the same number of nodes that repeat this element. It does not matter whether you preserve the original linked list or destroy it in the process of building the two new lists, but your comments should document what happens to the original linked list. The method returns two head references—one for each of the linked lists that were created.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here