Its hard enough to find an error in your code when you are looking for it; its even harder when you ve assumed your code is error-free. Steve McConnell

Intersection of two Sorted Lists

Language Java | Level Intermediate | Category Data structure | September 5, 2015 10:50 pm


Data structure Description

Write a program to find intersection nodes from two linked lists. The utility function takes two linked list head nodes and returns the intersection linked list head. The display function iterate all the nodes from intersection linked list and display.


Output

   					 

Items from the first list: [1, 1, 1, 4]
Items from the Second list: [1, 1, 1, 4]
Intersection Items: [1, 4]

				    

Comments


No comments available!

Please login to add comments.