L13. Find the middle element of the LinkedList | Multiple Approaches

  Рет қаралды 80,724

take U forward

take U forward

Күн бұрын

Пікірлер
@yashsherekar7148
@yashsherekar7148 Жыл бұрын
please make similar playlist on string data structure with such vast variety
@Rahulkumar-cg8rh
@Rahulkumar-cg8rh 8 ай бұрын
at 12:53, just correct fast as fast = fast->next->next, rest is aweasome .......
@BhanuPratapSinghRajawat-iz2tf
@BhanuPratapSinghRajawat-iz2tf Жыл бұрын
at 12:51 in pseudo code of tortoise and hare algo fast should move two step just telling so that no one confuses else am not that capable that i can find out ur mistakes
@AyushRawat-v8m
@AyushRawat-v8m 7 ай бұрын
you re right i came to comment this out but you ve done it much before i m going to
@randalthor69
@randalthor69 5 ай бұрын
chill dude nobody's thinking that
@racks8493
@racks8493 4 ай бұрын
noticed
@KartikeyTT
@KartikeyTT 8 ай бұрын
Bro this video deserves a lot more that just 844 likes. Everyone please do your part.
@dogwoofwoof8154
@dogwoofwoof8154 7 ай бұрын
slow and fast pointer concept was awesome
@trailblazer555
@trailblazer555 10 ай бұрын
Understood well..Thanks Striver!!!
@parul8334
@parul8334 Жыл бұрын
Love u sir 💕 thanks for ur efforts 💓 please keep it up , u are very intelligent 🤓
@CS-RubavathyMR
@CS-RubavathyMR 10 ай бұрын
your explanation is great for understanding the problem. Thank you bro❤
@priyotoshsahaThePowerOf23
@priyotoshsahaThePowerOf23 5 ай бұрын
Striver , at 12:49 please change it to fast->next->next;
@hareshnayak7302
@hareshnayak7302 9 ай бұрын
Understood, Thanks striver for thia amazing video.
@PCCOERCoder
@PCCOERCoder Ай бұрын
Lecture successfully completed on 27/11/2024 🔥🔥
@nirajchanekar
@nirajchanekar 9 ай бұрын
love u brother, Great Explanation ❤
@DhrumilShahDOTin
@DhrumilShahDOTin 4 ай бұрын
bro this was simple as f .... appreciated
@vattiyeshwanth282
@vattiyeshwanth282 7 ай бұрын
is it ok? to not come up with the optimal solution , but understood very well after learning.
@knowthrvdo
@knowthrvdo 10 ай бұрын
NICE LECTURE AND PLZ UPLOAD REMAINING LECTURES OF A TO Z SDA SHEET PLZ THEY ARE VERY HELPFULL FOR US
@anuplohar23
@anuplohar23 11 ай бұрын
Great Explanation ❤
@selene8721
@selene8721 8 ай бұрын
Thank you so much striver!!
@shrutishukla6336
@shrutishukla6336 9 ай бұрын
Amazing Explanation.
@ManishKumar-v7r7q
@ManishKumar-v7r7q 2 ай бұрын
Why used && in while statement not || in the optimized solution?
@akashdevmore4447
@akashdevmore4447 2 ай бұрын
like if fast ptr reaches end of LL or fast ptr points to null then we have to break the loop.so loop should run means slow and fast ptrs should move till fast ptr reaches end of LL or points to null. so if any of cases happens then while loop will break and give exact middle of LL.
@samarthpai5359
@samarthpai5359 Ай бұрын
Understood sir
@sophiejena5499
@sophiejena5499 2 ай бұрын
Nice explanation
@_CodeLifeChronicles_
@_CodeLifeChronicles_ 7 ай бұрын
great explanation
@ddevarapaga5134
@ddevarapaga5134 5 ай бұрын
Understood bhai Thank you
@YourCodeVerse
@YourCodeVerse 11 ай бұрын
Understood✅🔥🔥
@rockstarCoolz
@rockstarCoolz 7 ай бұрын
Sir in both we can do n/2 ...and point front=temp->next
@Adarsh_agrahari
@Adarsh_agrahari 8 ай бұрын
Today i give the same sol in the class
@ABISHEK-r7k
@ABISHEK-r7k 11 ай бұрын
UNDERSTOOD SIR
@vinaynegi8454
@vinaynegi8454 5 ай бұрын
love you bro ,
@striverdaaadi
@striverdaaadi Жыл бұрын
awesome content
@kartikpatel-u8b
@kartikpatel-u8b 3 ай бұрын
🤗🤗Here is the code with 100% beat: ListNode* middleNode(ListNode* head) { ListNode* slow=head; ListNode* fast=head; while(fast && fast->next) slow=slow->next, fast=fast->next->next; return slow; }
@ShubhamSolanki-uz4ht
@ShubhamSolanki-uz4ht 2 ай бұрын
Understand ✌️
@Learnprogramming-q7f
@Learnprogramming-q7f 10 ай бұрын
Thank you bhaiya
@ssss1234aaaa
@ssss1234aaaa 11 ай бұрын
Please make playlist on string very much needed.
@PawanKumar-hq6dy
@PawanKumar-hq6dy Ай бұрын
public Node middle(Node head){ if(head == null || head.next == null) return head; Node slow = head; Node fast = head.next; while (fast!=null){ slow = slow.next; if(fast.next == null){ break; } fast = fast.next.next; } return slow; }
@DeadPoolx1712
@DeadPoolx1712 3 ай бұрын
UNDERSTOOD;
@NARUTOUZUMAKI-bk4nx
@NARUTOUZUMAKI-bk4nx 11 ай бұрын
Understooood
@DeepakPatel-d5v
@DeepakPatel-d5v 9 ай бұрын
Thanks a lot
@malaykhakhar
@malaykhakhar 11 ай бұрын
Great
@rushidesai2836
@rushidesai2836 8 ай бұрын
Nice
@om3478
@om3478 11 күн бұрын
understood!!
@MJBZG
@MJBZG 6 ай бұрын
good algo
@therealartist9
@therealartist9 11 ай бұрын
can someone pls write the code for the fast and slow logic in vs code i am completely unable to write that logic in the vs code
@swapnilpawar8487
@swapnilpawar8487 11 ай бұрын
#include using namespace std; class Node{ public: int data; Node* next; }; class linkedList{ public: Node* head; linkedList(){ head=nullptr; } void append(int data){ Node* newNode =new Node(); newNode->data=data; newNode->next=nullptr; if(head==nullptr) head=newNode; else{ Node* p=head; while(p->next !=nullptr){ p=p->next; } p->next=newNode; } } Node* middleNode(){ Node* slow=head; Node* fast=head; while(fast != nullptr && fast->next != nullptr){ slow = slow->next; fast= fast->next->next; } return slow; } }; int main(){ int A[]={12,43,23,86,64,3,56,7,577,10}; int n=sizeof(A)/sizeof(A[0]); linkedList MyList; for(int i=0;i
@kalabanki4865
@kalabanki4865 Жыл бұрын
I'm a final year student should I follow sde a-z sheet as a beginner reply me
@arundhatipatil457
@arundhatipatil457 Жыл бұрын
first learn c++ then tcs striver sheet and then follow a to z sheet
@harshpalsingh1145
@harshpalsingh1145 Жыл бұрын
It matters on your capabilities as well. If you feel a-z sheet is comfortable then follow it otherwise do easier sheets first. Also learning a language like cpp or java and learning DSA are two different things. Give importance to both and yes you can do both side by side.
@084abhigna_y8
@084abhigna_y8 9 ай бұрын
Thnak you
@Deena_Bandhu
@Deena_Bandhu Жыл бұрын
rhank you bhayya
@codeman3828
@codeman3828 11 ай бұрын
Understood
@chiragbansod8252
@chiragbansod8252 9 ай бұрын
understood
@harshitjaiswal9439
@harshitjaiswal9439 11 ай бұрын
understood.
@suryasaimaheswar8636
@suryasaimaheswar8636 4 ай бұрын
understood :)
@iamnoob7593
@iamnoob7593 10 ай бұрын
US
@SamyakSharma-oy1bv
@SamyakSharma-oy1bv 2 ай бұрын
respect++;
@cenacr007
@cenacr007 10 ай бұрын
us
@bottunaveen4902
@bottunaveen4902 9 ай бұрын
Great Explanation ❤
@SibiRanganathL
@SibiRanganathL 9 ай бұрын
Understood
@abhinanda7049
@abhinanda7049 9 ай бұрын
understood
@dewanandkumar8589
@dewanandkumar8589 7 ай бұрын
Understood
@VibhaJamadagni-hz6ck
@VibhaJamadagni-hz6ck 7 ай бұрын
understood
@abhishekprasad010
@abhishekprasad010 7 ай бұрын
Understood
@ashishpradhan6250
@ashishpradhan6250 6 ай бұрын
understood
@himasreedadam7670
@himasreedadam7670 Ай бұрын
understood
@himanshidafouty347
@himanshidafouty347 6 ай бұрын
Understood
@hitheshpk6030
@hitheshpk6030 4 ай бұрын
Understood
@rutujashelke4208
@rutujashelke4208 4 ай бұрын
Understood
@harigs72
@harigs72 3 ай бұрын
Understood
@sid1993ful
@sid1993ful 10 күн бұрын
Understood
L14. Detect a loop or cycle in LinkedList | With proof and Intuition
20:26
L12. Find the intersection point of Y LinkedList
32:05
take U forward
Рет қаралды 89 М.
Vampire SUCKS Human Energy 🧛🏻‍♂️🪫 (ft. @StevenHe )
0:34
Alan Chikin Chow
Рет қаралды 138 МЛН
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 193 М.
Fast and Slow Pointers in 6 Minutes | LeetCode Pattern
6:09
AlgoMasterIO
Рет қаралды 3,6 М.
Netflix Removed React?
20:36
Theo - t3․gg
Рет қаралды 51 М.
7 Outside The Box Puzzles
12:16
MindYourDecisions
Рет қаралды 17 М.
one year of studying (it was a mistake)
12:51
Jeffrey Codes
Рет қаралды 93 М.
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Рет қаралды 780 М.
The hardest problem on the hardest test
11:15
3Blue1Brown
Рет қаралды 15 МЛН