https://ide.codingblocks.com/s/68728
https://hack.codingblocks.com/contests/c/53/471
2 testcases are giving runtime error
from where I will get that code
send me code link please
@Gaurav13998 hey gaurav i will delete this link after some time so please go through as soon as possible
hey bro, are you understanding what I am asking you…i asked for helped and you replied that you are giving me an updated code…my question is where is that code…I am not able see it here…
where I will get that posted code.
explain me line no. 81 to 90 in your code
@Gaurav13998 hey gaurav the functionality depend on the two function
1 detectcycle
the working of this function is to detect cycle in this function we have to two pointer 1 slow pointer and second is fast pointer
this is called runner technique
this function return value of point where both pointer meets
this value is used as input in second function i.e fp
now lets talk about second function
2 breakcycle
In breakcycle we are passing two parameter first head second point at cycle form
i.e looppt
when looppt ==head
we will take a pointer next to head
we will move forward until head and head next point overlap each other if it is overlap then while loop stop it execution and head next point will assign with null here head as first parameter and kk is head next so don’t confuse with it
why we are doing this
when looppt ==head
we will take a pointer next to head
we will move forward until head and head next point overlap each other if it is overlap then while loop stop it execution and head next point will assign with null here head as first parameter and kk is head next so don’t confuse with it