i dont but i get a lot of clarity from your videos , Thanks a lot
@hunorvadasz-perhat6001 Жыл бұрын
Good explanation! Thank you for the great video 😃
@nikoo28 Жыл бұрын
thank you for subscribing.. :)
@poojakasar4572 Жыл бұрын
explanation is awesome💥💥👍
@matthewzarate88514 ай бұрын
Loved the explanation for both implementations! Thanks Nikhil!
@honey-xr5kp6 ай бұрын
Love your videos! Very well explained. When I tried this code though, I received a time limit exceeded error. I'm sure its on my end, but I'm not sure why because as far as I know its the same code and should work.
@nikoo286 ай бұрын
try the code available on github (link in description)
@HemaSanthoshiAkula Жыл бұрын
such a clean explanation, i loved it
@infinite639 Жыл бұрын
Why not using collection linkedlist of java Why we are making our own linkedlist ? Why we are making our own tree? Please answer
@bhumikabansal6022 Жыл бұрын
your all explanations are awesome
@nikoo28 Жыл бұрын
Thank you so much 😀
@Hello-l3i25 күн бұрын
i am not getting ,what if the no.of nodes is odd ???pls explain
@deeptigarg7996 ай бұрын
When we are doing fast = head and traversed fast to null then why head is not null. Aren't we dealing with the address?
@shubhamgupta8248 Жыл бұрын
Not able to understand why i am getting an error when i write while(fast!=null) { if(fast.val!=slow.val) { return false; }
@nikoo28 Жыл бұрын
compare to the code I have
@naruto_66638 ай бұрын
so if this answer matters if we write fast != null we will see we have not breaked the linked list in two there is still connection between the 7->2 so that will not be null thats why we write slow != null as slow pointer will point to null 7->null (after the reverse of the list):)
@indrajith20029 ай бұрын
bro but for odd testcase it doesnt work .lets say we have a testcase 1->2->3->2->1->null according to you slow points to middle 3 , now if we reverse it will become 1->2->3->null ,where fast points to starting 1 .now if start comparing values @ fast and slow upto 2 it will be same after that slow points to 3 but fast points to null .so what to do?
@nikoo289 ай бұрын
It does work, did you try with such a case?
@bhavishyathota61602 ай бұрын
ok,but what's in case of linkedlist of odd length?
@nikoo282 ай бұрын
The middle element does not matter. 1 4 x 4 1 The middle element x could be anything
@AlgoXperience11 ай бұрын
i love it
@121sarthkumar45 ай бұрын
when we do fast= head does it start from for head of ex 237732 this value or is it half
@nikoo284 ай бұрын
Can you please elaborate on your example?
@appikeeru57853 ай бұрын
Y in his videos very less viewers😢
@rezowanamehjabinlorel14287 ай бұрын
Please make more explanation videos
@nikoo287 ай бұрын
Will do..new video every week 😄 Please share as much possible too 😎
@padmajab2294 Жыл бұрын
Nice explanation
@cautioni5 ай бұрын
please do a longest palindrome in a linked list
@nikoo285 ай бұрын
Will add it to my pipeline of video
@alihaiderzada423 Жыл бұрын
The stack solution does not work if the pattern is 2 - 3 - 7 - 3 - 2. even tho it is a palindrome
@bhumikabansal6022 Жыл бұрын
go with the optimized one
@SaumyaSharma007 Жыл бұрын
Hello, what you can do: Traverse entire L. List. (Let Length of LList come out be n) Just push n/2 elements in the stack. Now you can check if n is odd which is your case. Curr will be pointing to -7. So Curr = Curr-> next; Now start comparing left-out L list with stack elements. If n was even. Eg 2 -3 -3 2 Then We would have done nothing. Coz We have already pushed n/2 elements. And Curr will be pointing to the Third element. Now start comparing left-out L list with stack elements. Hope it helps. 😄
@alihaiderzada423 Жыл бұрын
@@SaumyaSharma007 awesome thanks buddy i will give it ago.. :)