Unformatted text preview: : Write a method public [ ] List splitIntoTwoLists( ) that splits the current linkedList L into two sub-lists L1 and L2 . One for the first front half of L , and one for the back half of L . If the number of elements is odd, the extra element should go in the front list. Example: L = (2, 3, 5, 7, 11), After splitting we will have two list s: L1 = (2, 3, 5) and L1 = (7,11)...
View Full Document
- Spring '11
- Java Programming, Prime number, list L1, public List intersection