I watched almost all your videos of Graph concepts as well as Graph Popular interview problems. I admit that no one today can teach like you 🔥
@surajsidar32804 ай бұрын
I was asked this question in Amazon SDE1. The interviewer asked both solution(2 pass and 1 pass) I am commenting here so that I will see my own comment in the future.
@adamyasharma_0135Ай бұрын
was looking for a proper reason for slow and fast approach,and as always found it at the best place
@souravjoshi22938 ай бұрын
Hi MIK, I was able to solve today's gfg potd because of your comparator video you posted few days ago. just wanted to thank and appreciate you
@adarshjha51268 ай бұрын
Bhaiya if you get some time then please try to make a video on yesterday biweekly problem C ...i did a lot of practice in graphs but still was not able to solve it...😢😢
@wearevacationuncoverers8 ай бұрын
I also couldn't solve :-(
@codestorywithMIK8 ай бұрын
Definitely. Actually I am travelling this weekend. Once I get back home after 2 days, I will upload 🙏
@oqant04248 ай бұрын
@@codestorywithMIK please upload both 3,4
@arjunrai81268 ай бұрын
Pls upload@@codestorywithMIK
@ugcwithaddi8 ай бұрын
Made it simple and easy 👌🏻
@tutuimam33818 ай бұрын
Amazing explanation ❤❤
@gui-codes7 ай бұрын
Thanks man. you are too good
@iWontFakeIt8 ай бұрын
solved it on my own
@gauravbanerjee28988 ай бұрын
Thank you so much bhaiya ❤❤
@dayashankarlakhotia49438 ай бұрын
var RemoveNthFromEnd=function(head,n){ let fast=head,slow=head; for(let i=0;i
@daniel-so7cv8 ай бұрын
bhai konsa college se ho
@dayashankarlakhotia49438 ай бұрын
purima university Jaipur
@EB-ot8uu8 ай бұрын
awesome as always
@maheshkeshwala628 ай бұрын
Bro can you please upload question 3 and 4 of leetcode contest every week it will be so helpful
@pragatigoyal40157 ай бұрын
i dont see deleing in c#, can you please explain if assigning next element automatically release the unwanted object in c#
@arjunju4698 ай бұрын
wil u make the today leetcode contest video ??
@codestorywithMIK8 ай бұрын
Definitely. Actually I am travelling this weekend. Once I get back home after 2 days, I will upload 🙏
@DevOpskagyaan8 ай бұрын
Kitna simple bana dete ho bhai qn ko. Matlab beijjati hojati hai qn ki 😂
@AdityaGupta-zd5sq8 ай бұрын
sir please contest related video banaaiye
@wearevacationuncoverers8 ай бұрын
I also did with one more approach. Reverse the node delete nth node reverse it back class Solution { public: ListNode* reverseList(ListNode* head) { ListNode* prev = nullptr; ListNode* current = head; ListNode* next = nullptr; while (current != nullptr) { next = current->next; current->next = prev; prev = current; current = next; } return prev; } ListNode* removeNthFromEnd(ListNode* head, int n) { if (head == nullptr || n next; } // If the node to be removed is the first node if (prev == nullptr) { head = current->next; } else { prev->next = current->next; } // Reverse the linked list back to its original form head = reverseList(head); return head; } };
@2110__NishantThakare8 ай бұрын
This solution will be 3 pass so not so optimal😊
@aws_handles8 ай бұрын
@@2110__NishantThakarecorrect. Its a 3 pass
@codeandtalk68 ай бұрын
❤❤❤❤
@AmanKumar-qz4jz8 ай бұрын
bhaiya agar aap live biweekly or weekly leetocode contest solve karoge toh bhut fayda hoga
@codestorywithMIK8 ай бұрын
Definitely. Actually I am travelling this weekend. Once I get back home after 2 days, I will upload 🙏
@dayashankarlakhotia49438 ай бұрын
if llsize==even then temp ==null&&llsize()==oddthen temp.next==null.
@coderletscode8 ай бұрын
Although i am doing dsa with java but language does not matter for DSA..logic is same but you should continue with java.
@infinitygaming71928 ай бұрын
bhaiya gfg ka potd le aoo
@kamranwarsi12b228 ай бұрын
Can we do something like first reverse the list and then traverse , will it work? 🤔
@wearevacationuncoverers8 ай бұрын
yes I did the same. it works. But yeah, I will have to traverse the array multiple times.
@kamranwarsi12b228 ай бұрын
@@wearevacationuncoverers can you plz share ur code
@wearevacationuncoverers8 ай бұрын
@@kamranwarsi12b22 sure bhai. class Solution { public: ListNode* reverseList(ListNode* head) { ListNode* prev = nullptr; ListNode* current = head; ListNode* next = nullptr; while (current != nullptr) { next = current->next; current->next = prev; prev = current; current = next; } return prev; } ListNode* removeNthFromEnd(ListNode* head, int n) { if (head == nullptr || n next; } // If the node to be removed is the first node if (prev == nullptr) { head = current->next; } else { prev->next = current->next; } // Reverse the linked list back to its original form head = reverseList(head); return head; } };
@kamranwarsi12b228 ай бұрын
@@wearevacationuncoverers shukriyaa 🙇♂️🙇♂️
@DevOpskagyaan8 ай бұрын
Wow. Thanks man
@dayashankarlakhotia49438 ай бұрын
Please change the link of leetcode
@codestorywithMIK8 ай бұрын
Done. Thank you ❤️😇
@therealsumitshah8 ай бұрын
Iss waale problem mei temp != NULL condition kyu chahiye bina uske bhi chal rha hai ye toh. @codestorywithmik