So, I am facing a doubt here.
I was reading the book Cracking the coding Interview. The following text is written over there.
Suppose you had a linked list
Start p2 at second position.
a1(p1)-> a2 (p2) -> a3 -> a4 -> b1 -> b2 -> b3 -> b4 a1-> a2 (p1) -> a3 -> a4 (p2)-> b1 -> b2 -> b3 -> b4 a1-> a2 -> a3(p1) -> a4 -> b1 -> b2(p2) -> b3 -> b4 a1-> a2 -> a3 -> a4(p1) -> b1 -> b2 -> b3 -> b4(p2)