This preview shows page 1. Sign up to view the full content.
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
This note was uploaded on 11/28/2011 for the course COMPUTER S 113 taught by Professor Dr.safwanqasem during the Spring '11 term at King Saud University.
- Spring '11
- Java Programming