while loop looks incorrect as you are saying "or" condition but programmed "and" condition. But, I checked further and confused about why does the program fail when worked with "or " condition?
Can we use (slowPtr != null) with remaining conditions in while loop I think this will also work May I know why you are not adding (slowPtr != null) in while condition.
Ultimate explanation ❤
The way of explaining is amazing......
infinite likes
glad i could help
Explanation is gold! Thank you my good sir!
The way you explain is mind blowing. Keep posting such videos!! Thanks a lot
nice explanation sir i understood now slow and fast pointer method .
Thank you🙂
Thank you so much for this explanation and I understood it perfectly
very good explanation and thought. thank you sir
Explained Perfectly! Thanks
Amazing explanation sir!
Thanks sir for great explanation
Awesome teaching!
So happy to read this.
Great example
while loop looks incorrect as you are saying "or" condition but programmed "and" condition. But, I checked further and confused about why does the program fail when worked with "or " condition?
it just means that you need to run the while loop until both fastPtr and fastPtr.next are not null
sir what if the length of LL is bigger?
Can we use (slowPtr != null) with remaining conditions in while loop I think this will also work
May I know why you are not adding (slowPtr != null) in while condition.
why do you want to add additional conditions?
@@nikoo28 we are moving slow pointer along with fast ptr right then why we are not adding slow pointer
@@kalyanamvenumadhav2245 fast pointer is moving twice the speed isnt it obvious it will reach null first.