Given a linked list which contains some loop.
You need to find the node, which creates a loop, and break it by making the node point to NULL.
3 -> 2 -> 4 -> 5 -> 6 ^ | | | - - - - - -
3 -> 2 -> 4 -> 5 -> 6 -> NULL
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.