Best explanation for the solution, neetcode doesnt come close at all.
@nikoo287 ай бұрын
So glad that you feel that way 😄
@urvashichaurasia6284Ай бұрын
Sir please start a playlist of hard DSA problems.
@tundeadebanjo65792 ай бұрын
Wow! Brilliant explanation! You have helped me to finally demystify the fear around coding algorithm.
@sachinsoma57579 ай бұрын
This channel is a gem. Thanks Nikhil for the wonderful explanation.
@AadeshKulkarni6 ай бұрын
What I like about your videos is how you explain the brute force approach first and then explain the optimised solution. Introducing brute force solutions to noobs like me gives us some confidence and with that confidence + your simplicity of explaining the optimised solution works like charm, baba Beautiful! I also like how the structure is consistent across every video that you upload. Keep rising Nikhil🚀
@technicalguy.8 ай бұрын
Glad to have teachers like you ❤
@wilberrosales6345Ай бұрын
great explanation bro. Thanks for the video
@Muhammad_Kabil3 ай бұрын
Your way of explanation!!! Thank you so much.
@jaydeepvasoya62435 ай бұрын
Non forgettable explanation ...! Excellent
@shayannafees9936Күн бұрын
best explanation ever !!!!
@sanjeets9316 күн бұрын
very nicely explained
@shivraj9409 ай бұрын
Great explanation👍 . For removing nth from start, we can simply iterate (n-1)th node and map n-1 -> n+1. TC : O(n) and SC : O(1)
@nikoo289 ай бұрын
Very good
@shivraj9409 ай бұрын
@@nikoo28 can you please explain more on the usage of dummy node ? like when we get index out of bound , etc and what’s the problem we face without using dummy node ?
@nikoo286 ай бұрын
@@shivraj940i can talk about it in a video. But generally, a dummy nodes all those null pointer exceptions. And you can get rid of it anytime you want.
@atanukundu_106 ай бұрын
Thank you Nikhil bhai, you helped me a lot with linkedlist problems.
@robertnant12646 ай бұрын
Such amazing content!! These videos are so well done. Thank you
@Pontiff032 ай бұрын
Make an Adjustment to the code in while moving the secondPtr... set the limits of the for loop to be from i=1 to i
@uxoyplayz33737 ай бұрын
great explanation you are doing great keep going
@Aspiringactor02Ай бұрын
Wow explaination
@121sarthkumar44 ай бұрын
Even without dummy we can do this ??
@parthmodi20287 ай бұрын
great Explaination
@lookahead2796 ай бұрын
at 9:20 we just have one node, so n should be n=0 . If n=1 then we will have exception . while n=1 , you are removing 8 not 4 in the previous example.
@nikoo28056 ай бұрын
That is exactly why the dummy node helps. The first node from last is actually the first node that we have to remove
@srinivas169410 ай бұрын
Thank you for explaining. Can you please start a playlist of solving leetcode 75. It would be very helpfulto us.
@nikoo289 ай бұрын
once, I complete all the basic concepts...yes, I will start that playlist..otherwise it becomes hard to refer to those explanations
@tasniatahsin86376 ай бұрын
thanks a lot nikhil you are a gem
@deepaliyadav64445 ай бұрын
Amazing explanation❤
@jritzeku4 ай бұрын
Can you explain dummy node logic for following case where head is deleted? 1->2->3->4->null , n=4 ....basically removes head node: PSEUDO code: -run first loop to advance 'right; as far as n allows dummy->1->2->3->4(second)->null. //second goes to tail -on second loop , advance 'left' as far as we can dummy(first)->1->2->3->4->null //first stays at dummy .. -our target deletion node ends up being the head node1 first.next =first.next.next dummy->1->2(first.next)->3->4->null HOW does dummy.next give u node 2? Doesn't it point to original head? The only thing that could make sense is firstPtr' serves as an alias to dummy but that logic fails becuase then we should be able to return left.next as final answer. This passes test case for where head node is deleted but not where non head node is deleted.
@JustMeItsMMN4 ай бұрын
Thank you sooooooo much ❤❤
@nikoo283 ай бұрын
You're welcome 😊
@sreejasree742718 күн бұрын
thankyou sir
@Karthik-fl4cq9 ай бұрын
Nice explanation sir 👍. Can we store all the pointers in a arraylist and storing its length in one ireration and mapping pointer of that index(len-n) to its next. Is that approach correct sir??
@nikoo288 ай бұрын
Yes we can, but then you are taking extra space. Ask your interviewer if you are allowed to do so.
@Karthik-fl4cq8 ай бұрын
@@nikoo28 OK sir thanks for your reply
@ssss221442 ай бұрын
Wow❤
@naveenkumarkota20907 ай бұрын
@nikhi if not the case of just one traveal can i reverse the linked list and delete it from the first and return the new linkedlist ?
@nikoo286 ай бұрын
yes, you can do it...but ask your interviewer first
@THOSHI-cn6hgАй бұрын
❤
@ayandutta97587 ай бұрын
In that dry run section in that while loop it'd be SecondPtr instead of SecondPtr.next
@nikoo287 ай бұрын
what do you mean? it should be secondPtr = secondPtr.next; Can you please clarify?
@Twintowers9.116 ай бұрын
@@nikoo28 they meant , while(secondPtr != NULL) not while(secondPtr.next != NULL)