Math, asked by rajendraaryanr4256, 1 year ago

Given two linkedlists. Find the intersection point of those two linkedlists

Answers

Answered by PiyushSinghRajput1
2
Have a visited flag with each node. Traverse the first linked list and keep marking visited nodes. Now traverse the second linked list, If you see a visited node again then there is an intersection point, return the intersecting node. This solution works in O(m+n) but requires additional information with each node.
Similar questions