Find intersection and cycle in a linked list.
Anoniem
For finding the intersection of the linked list, I gave 2 approaches. One was a naive approach with O(N^2) complexity and another by reversing both the linked list and finding the intersection. For finding cycle, I used Floyd's Cycle Finding Algorithm.