-
Category : Data structs
Tags :
- Update : 2015-02-02
- Size : 3kb
- Downloaded :0次
- Author :ta***
- About :
Nobody
- PS : If download it fails, try it again. Download again for free!
Introduction - If you have any usage issues, please Google them yourself
The newly added method should work as follow:
1. Takes two input objects L1 & L2 of type SinglyLinkedList,
2. L1 & L2 represents two Integer list in ascending order,
3. Returns an object L3 with the sorted merge value of L1 & L2
4. For example: L1= {1, 7, 12, 13, 20} and L2= {2, 3, 6, 9, 25},
5. Then: L3= {1, 2, 3, 6, 7, 9, 12, 13, 20, 25}
Idea of Working
While L1 is not empty and L2 is not empty:
If first element of L1 < first element of L2:
Remove first element L1
Insert element into L3
End if
Else:
Remove first element L2
Insert element into L3
End while
If L1 is not empty and L2 is empty:
Insert the rest of elements L1 into L3
If L2 is not empty and L1 is empty:
Insert the rest of elements L2 into L3
Packet file list
(Preview for download)
SinglyLinkedList\.classpath
................\.project
................\src\SinglyLinkedList$Node.class
................\...\SinglyLinkedList.class
................\bin
................\src
SinglyLinkedList
Related instructions
- We are an exchange download platform that only provides communication channels. The downloaded content comes from the internet. Except for download issues, please Google on your own.
- The downloaded content is provided for members to upload. If it unintentionally infringes on your copyright, please contact us.
- Please use Winrar for decompression tools
- If download fail, Try it againg or Feedback to us.
- If downloaded content did not match the introduction, Feedback to us,Confirm and will be refund.
- Before downloading, you can inquire through the uploaded person information