N
nishit.gupta
finding a loop in a lisked list without modifying it.
1.reverse and check for beginning.
2.take two pointers, keep moving 1st by one and 2nd by two locations,
if they meet loop exists.
3.store addresses in an array.
is their any other possible solution???
1.reverse and check for beginning.
2.take two pointers, keep moving 1st by one and 2nd by two locations,
if they meet loop exists.
3.store addresses in an array.
is their any other possible solution???