Uploaded by IIqra TToheed

Task 4

advertisement
Task 4 :
In this task, you are required to follow the same format/classes as discussed in class.
You are required to merge two circular linked lists in reverse sorted order. Initially
assume that both the linked lists are in sorted order. Following example scenarios
explain the idea
Input: List 1: 2->4->6->8->10
List 2: 1->5->19
Output: mergedList: 19->10->8->6->5->5->4->2->1
First briefly explain your high-level logic, and then write down the function that will be
required. Functions could be:
insertNode (We already did that in class)
mergeReverseSorted (you need to write this function)
comparex_y (this will be called with in the mergeReverseSorted)
displayList (We already did that in class)
Declare classes properly, and write down proper main function. You may skip
functions that were already covered in class e.g. insertNode, displayNode etc.
Download