Append Last K Nodes of a Linked List | C++ Placement Course | Lecture 22.7

  Рет қаралды 99,811

Apna College

Apna College

Күн бұрын

Complete C++ Placement Course (Data Structures+Algorithm) : • C++ Full Course | C++...
Telegram: t.me/apnikaksh...
Instagram: / dhattarwalaman
Notes of this Lecture:

Пікірлер: 182
@zaeemAtif
@zaeemAtif 3 жыл бұрын
yrr, kitna mast programming course he, iam feeling better at coding day by day. THANKS Aman bhaiya, but still can't thank you enough...!!!
@harshitrathi3077
@harshitrathi3077 4 жыл бұрын
VOTE FOR THE BEST COURSE OF APNA COLLEGE: LIKE : C++ DSA COMMENT : WEB DEVELOPMENT
@techramen1681
@techramen1681 4 жыл бұрын
One ❤️ for our beloved teacher Didi..!!
@sarveshverma1794
@sarveshverma1794 4 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU suree
@DineshSharma-pp3ox
@DineshSharma-pp3ox 3 жыл бұрын
❤️
@piyushbhatnagar7869
@piyushbhatnagar7869 2 жыл бұрын
Tharki ho beta
@sachinbairi6353
@sachinbairi6353 3 жыл бұрын
Literally when she said toh shuru karte hai for a sec I felt like she was going so say " toh shuru karte hai bina kisi backchodi ke " 😂😂
@divyanshpatel6322
@divyanshpatel6322 3 жыл бұрын
same here 😂😂
@ankurkhandelwal1375
@ankurkhandelwal1375 3 жыл бұрын
Same here 🤣🤣🤣🤣🤣
@tausifahmad2007
@tausifahmad2007 3 жыл бұрын
true😁😁
@rachitjaiswal8249
@rachitjaiswal8249 4 жыл бұрын
Please bhaiya n didi continue this series i know im a bit slow but im trying to cover it up.Its the best c++course abilable LOVE U ALL
@sarveshverma1794
@sarveshverma1794 4 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU sureee
@SaurabhkochGohain
@SaurabhkochGohain 3 жыл бұрын
I guess in while loop the count is not correct because in the video , the output is only correct because l was 6 and when done l-k it came out 3, but if the l was different like l = 8 then count would have traversed till (l-k = 5) which is not the required output. instead we can take count == k for newtail and count == k+1 for newhead.. Anyway lots of thanks for providing such a wonderful content. lots of love Bhaiya ❤️
@vedantkhandelwal4454
@vedantkhandelwal4454 3 жыл бұрын
This course is best for revision
@vedantkhandelwal4454
@vedantkhandelwal4454 3 жыл бұрын
No bro this is best
@vedantkhandelwal4454
@vedantkhandelwal4454 3 жыл бұрын
yes , you are right
@vedantkhandelwal4454
@vedantkhandelwal4454 3 жыл бұрын
Yo bro got it
@vedantkhandelwal4454
@vedantkhandelwal4454 3 жыл бұрын
Nice course by Aman d.
@vedantkhandelwal4454
@vedantkhandelwal4454 3 жыл бұрын
Very good team of aman bhaoya
@sushilchaurasia
@sushilchaurasia 4 жыл бұрын
Great bhaiya ❤️❤️❤️ Aman Bhaiya is best ❤️❤️❤️ 🔥
@sandipanmukhopadhyay1957
@sandipanmukhopadhyay1957 4 жыл бұрын
We don't even need to count the length of the linked list. We can take two pointers fast and slow. First move the fast pointer by k steps. Then move the slow and fast together . We will get to our last kth node. Rest same as shown in video
@sarveshverma1794
@sarveshverma1794 4 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU ryjs
@_rahulsain
@_rahulsain 3 жыл бұрын
tab bhi time complexity o n rhegi
@webseriesworld1791
@webseriesworld1791 3 жыл бұрын
We can also done it by using 2 pointers Appraoch with Less Time Complexity generally O(n) because we did not have to find Length of the Linked List :- Solution :- Node* appendKNodes(Node* h, int k){ // if k = 0 means we did not have to append any node in the starting if(k == 0){ return h; } // Two Pointers starting with head Node* ptr1 = h; Node* ptr2 = h; // Counter variable int count = 0; // Traverse ptr1 to k times because there is one pointer exists which is k steps after the second one while(count < k){ ptr1 = ptr1->next; count++; } // if we reach to Null then it means value of k is equal to length of linked list so we return same list if(ptr1 == NULL){ return h; } // until the first pointer reaches to NULL increment second pointer while(ptr1->next != NULL){ ptr2 = ptr2->next; ptr1 = ptr1->next; } // Now we got our two pointers as discussed in video new tail as ptr2 and tail as ptr1 // then adding or deleting link Node* temp = h; h = ptr2->next; ptr2->next = NULL; ptr1->next = temp; // returning our new head return h; } // Watch floyd Algorithm for more
@obamaengineer4806
@obamaengineer4806 3 жыл бұрын
which yr r u in bro?
@its_neel_ok
@its_neel_ok 3 жыл бұрын
thanks bro
@sohanjangid1207
@sohanjangid1207 3 жыл бұрын
ye karke dekh bhai isme bhi O(n) hi he:) void appendknodes(node*&p,int k){ int a =1; node*q=p,*r=p,*pre; while(q->next!=NULL){ q=q->next; a++; } while(a-k){ pre=r; r=r->next; k++; } pre->next=NULL; q->next=p; p=r; }
@yashvats4756
@yashvats4756 3 жыл бұрын
No need to do this as finding length is also o(n) and on top of if we can use length to see if length < k , we can simply reverse the list instead of errror
@ankitchowdhury1748
@ankitchowdhury1748 2 жыл бұрын
node* kappend(node* &head, int k) { node* temp=head; node* newhead; node* newtail; int len=length(head); int c=0; while (cnext; c++; } newhead=temp->next; newtail=temp; while (temp->next!=NULL) { temp=temp->next; } temp->next=head; newtail->next=NULL; return newhead; } //this one's my way of approach and i found it easier (no judgment please)
@prodevmahi4901
@prodevmahi4901 3 жыл бұрын
Code in video is complex, here is a simple one - void appendk(node* &head, int posk) { //code to calculate size of ll before any changes node* temp = head; int size = 1; while(temp->next != NULL) { temp = temp -> next; size++; } node* tail = head; node* newtail = head; int count = 1; while(tail -> next != NULL)//count < lllen(head) - posk) { tail = tail -> next; } tail -> next = head; while(countnext; count++; } head = newtail -> next;//new head created , here 'newtail-> next' is new head newtail -> next = NULL;//new tail created }
@CEOplays
@CEOplays 2 жыл бұрын
simple code for easy understanding node* appendk(node* &head,int k){ node* temp=head; node* start; int count=1; while(temp->next!=NULL){ if(count==k)start=temp; temp=temp->next; count++; } node* newhead=start->next; start->next=NULL; temp->next=head; return newhead; }
@sushilchaurasia
@sushilchaurasia 4 жыл бұрын
Great ❤️❤️❤️❤️
@jassmanakfan555
@jassmanakfan555 4 жыл бұрын
Mera favourite course aur favourite teacher
@sarveshverma1794
@sarveshverma1794 4 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU xDD!!
@shrishtijain3788
@shrishtijain3788 3 жыл бұрын
Thank you so much for such a good playlist ❤️
@anantjain700
@anantjain700 3 жыл бұрын
node* appendK(node* head, int k) { int length = 1; node* temp = head; while(temp->next != NULL) { temp = temp->next; length++; } int count = length-k-1; node* newtail = head; while(count) { newtail = newtail->next; count--; } node* newhead = newtail->next; temp->next = head; newtail->next = NULL; return newhead; }
@singh_04
@singh_04 3 жыл бұрын
1:47 bina kisi bakchodi k would be more fun. 😁
@soumyaranjansahoo7201
@soumyaranjansahoo7201 2 жыл бұрын
void appendKnodes(node* &head,int postn){ node* newTail; node* connector=head; int count=1; while(connector->next!=NULL){ if(count==postn){ newTail=connector; } connector=connector->next; count++; } connector->next=head; head=newTail->next; newTail->next=NULL; }
@gouravsingh3640
@gouravsingh3640 4 жыл бұрын
Legend study at 11 :00 clock
@nausheensiddiqui8745
@nausheensiddiqui8745 4 жыл бұрын
Ultra legends study till 3 am.. I am one of them..
@gouravsingh3640
@gouravsingh3640 4 жыл бұрын
@@nausheensiddiqui8745 nice yrr
@gouravsingh3640
@gouravsingh3640 4 жыл бұрын
@@nausheensiddiqui8745 well done bro Bro i also inspired from you
@hitsgamingparadise5243
@hitsgamingparadise5243 4 жыл бұрын
I am legend. Living the life at 3:00 AM.
@snehilsinha4689
@snehilsinha4689 3 жыл бұрын
Mythics study from 9pm to 7am 😎
@DineshSharma-pp3ox
@DineshSharma-pp3ox 3 жыл бұрын
It is a very very helpful video thank you aman bhaiya and thank you all the team🥳
@harshpanwar1550
@harshpanwar1550 2 жыл бұрын
Thanks a ton Ma'am🙇‍♂️🙇‍♂️
@UECAshutoshKumar
@UECAshutoshKumar Жыл бұрын
Thank you
@vaibhavchauhan000
@vaibhavchauhan000 2 жыл бұрын
This one is my solution : - node* AppendLastKnodes(node* head, int k){ node* newTail=head; node* newHead=head->next; node* tail=head; while(k > 0){ tail = tail->next; k--; } while(tail->next != NULL){ newHead = newHead->next; newTail = newTail->next; tail = tail->next; } newTail->next = NULL; tail->next = head; return newHead; }
@usmanmunir1559
@usmanmunir1559 4 жыл бұрын
These videos are awesome on c++ .... why youtube algorithm don't recommend me
@rishabh7705
@rishabh7705 3 жыл бұрын
This channel is not monetized.
@romangaming5177
@romangaming5177 2 жыл бұрын
//Easy way node* append_k_nodes(node* &head,int pos){ node* temp=head; int counter=1; while(temp->next!=NULL && counternext; counter++; } node* new_head=temp->next; temp->next=NULL; node* tail= new_head; while(tail->next!=NULL){ tail=tail->next; } tail->next=head; return new_head; }
@TechnologyTraveler
@TechnologyTraveler 4 жыл бұрын
Wow excellent explanation
@ManishMeena-ph2vo
@ManishMeena-ph2vo 3 жыл бұрын
video code is not working for k==1 and k==0 , we can add below code ... if(k==1){ while(tail->next->next!=NULL){ tail=tail->next; } tail->next->next=head; newhead=tail->next; tail->next=NULL; return newhead; } if(k==0){ return head; }
@mrpro1054
@mrpro1054 8 ай бұрын
thanks bro i wasted my 3 our on this
@shaantyagi2187
@shaantyagi2187 3 жыл бұрын
now likes are 761 less as compared to previous , which shows bande josh josh main shuru toh kar dete hai but beech main quit kar dete hai .Winner will be jo last tak tika rahega !
@atharvjoshi2162
@atharvjoshi2162 2 жыл бұрын
Head = newHead bhi hona chahiye tha na...? PS. Thank you so much for such an amazing playlist🙏
@Godspeed1219
@Godspeed1219 3 жыл бұрын
Please bhaiya upload the notes of the lectures also along with the videos.
@adityabhandari6688
@adityabhandari6688 3 жыл бұрын
they uploaded all the notes of the linked list topic in a single drive file which was attached in the "introduction to Linked List" video. Go there and check you will find the notes!
@anshumankumarnathshahdev3090
@anshumankumarnathshahdev3090 3 жыл бұрын
excellent explanations
@sahilsawal664
@sahilsawal664 4 жыл бұрын
Nicely Explanation Ma'am :) 🔥👍👌✌
@hiteshjangid5040
@hiteshjangid5040 3 жыл бұрын
this approach work only if k>=2
@rohitsharma7553
@rohitsharma7553 3 жыл бұрын
void appendKnode(node *&head, int pos){ node *temp = head; if(pos == 1){ return; } int c = 1; while(temp->next != NULL && c != pos){ temp = temp->next; c++; } node *temp2 = head; while(temp2->next != NULL){ temp2 = temp2->next; } temp2->next = head; head = temp->next; temp->next = NULL; } // I solve this in this way, I am a just a beginner
@shivammaurya3451
@shivammaurya3451 4 жыл бұрын
Thanks mam
@xundansingh5618
@xundansingh5618 4 жыл бұрын
Kitne din wait krwawo ge wait krte krte sara c++ ka lecture dekh liye .i m in class 12 + cs branch
@harshwardhansingh8368
@harshwardhansingh8368 3 жыл бұрын
check this out its more simple void append(node* &head, int k) { node* temp1 = head; node* temp2 = head; int count = 1; while(temp2->next!=NULL) { temp2=temp2->next; } while(temp1->next!=NULL && count!=k) { temp1=temp1->next; count++; } temp2->next=head; head= temp1->next; temp1->next=NULL; }
@spiritualanandashram3437
@spiritualanandashram3437 4 жыл бұрын
समय कीमती है, थोड़ा समय देकर हमारे आश्रम की योजना को जान लीजिए, देश की सेवा करने के साथ-साथ धन कमाने का अवसर.. For more information touch the link kzbin.info/www/bejne/e4HVqICNjZKUbck
@swatisharma855
@swatisharma855 3 жыл бұрын
Bhaiya I am not able to access the notes . can you please help.
@shubhamtanwar6450
@shubhamtanwar6450 3 жыл бұрын
please Give full code from begining to end
@youreview5785
@youreview5785 4 жыл бұрын
Finally first😉😉
@hemanthmali8629
@hemanthmali8629 4 жыл бұрын
What if K>L? if k==7 anf l=5 then according to the above code k=k%L i.e k=2 which means last two nodes are to be appended first..?which is not the actual output right?
@sumitnarwani5417
@sumitnarwani5417 4 жыл бұрын
Its correct because when k==L then the list comes back to original state and then consider k=2
@hemanthmali8629
@hemanthmali8629 3 жыл бұрын
@@sumitnarwani5417 Thank you
@anshumankumarnathshahdev3090
@anshumankumarnathshahdev3090 3 жыл бұрын
how they can call insertat tail function without declaring it . here they r using array instead of linked list
@anubhavgupta7418
@anubhavgupta7418 3 жыл бұрын
coding ki text file ka link bhi description mai de diya kariye
@jitengarg5740
@jitengarg5740 3 жыл бұрын
is there any inbuilt function for finding length if link list us se badi help ho jati hai pr fir bhi khud funvtion likhne me jada time nahi lagta , if there is then plz share
@shreyakanodia5071
@shreyakanodia5071 3 жыл бұрын
We will not get output if k=1? Please help me how to solve this bug?
@ManishMeena-ph2vo
@ManishMeena-ph2vo 3 жыл бұрын
add this code... if(k==1){ while(tail->next->next!=NULL){ tail=tail->next; } tail->next->next=head; newhead=tail->next; tail->next=NULL; return newhead; }
@noone4789
@noone4789 4 жыл бұрын
This Voice has separate fanbase🕉️
@dheerajkhushalani2619
@dheerajkhushalani2619 3 жыл бұрын
Why you used k=k% l ?? it is not a circular linked list. If K is greater than the length of the linked list then it must be an error. But Thanks for the video.
@deepakrajgupta1177
@deepakrajgupta1177 3 жыл бұрын
why sometime we are using temp->next != NULL and sometimes temp != NULL?
@shubhamkale735
@shubhamkale735 3 жыл бұрын
when you see temp->next != NULL is used in deletion because if we want to delete last node its next pointer will always be NULL so we skip that step temp!=NULL this used when we iterate to the end of the list and its value is NULL then we return the output always understand the logic when reading the code
@unreal_tushar
@unreal_tushar 3 жыл бұрын
void appendk(node* &head,int k) { node* temp=head; node* temp2=head; int count=0; while(temp2->next!=NULL) { temp2=temp2->next; } node* oldtail=temp2; coutnext=head; head=newhead; } my code couldn't belive that it got succesful in one time now i also see the approach not the code of tje video
@avengerfirst1572
@avengerfirst1572 4 жыл бұрын
Great work mam
@fanframeorder4089
@fanframeorder4089 5 ай бұрын
notes kaha hai maam
@mukulchopra3378
@mukulchopra3378 3 жыл бұрын
Why at 03:10 the original tail is initialised by head ? Anyone please help
@deepshah1358
@deepshah1358 3 жыл бұрын
node *newList = kAppend(head, 1); is giving NULL as output. why?
@ShubhamPatil-uz9vb
@ShubhamPatil-uz9vb 3 жыл бұрын
bcz in this case l-k+1=l (k=1) and once we reach the last node we exit the loop. So the statement if(count==l-k+1) does not get executed and newHead pointer remains unintialised. Try this instead: node* appendK(node* &head,int k) { node* newTail=NULL; node* newHead=NULL; node* tail=head; int l = length(head); int count=1; k=k%l; while (tail->next!=NULL) { if(count==l-k) newTail=tail; if(count==l-k+1) newHead=tail; tail=tail->next; count++; } if(newHead==NULL) newHead=tail; tail->next=head; newTail->next=NULL; return newHead; }
@desiidea6577
@desiidea6577 4 жыл бұрын
Bhaiya organic tu dal do plZ
@satyjeetkumar1734
@satyjeetkumar1734 4 жыл бұрын
Didi when I can run the code then the output line is. Collect 2.exe: error: 1d returned 1 exit status. Please tàke it my problem. I am stuck before 1month in 2nd vedeo. Please.................. Please help me......
@dewangsingh3376
@dewangsingh3376 4 жыл бұрын
Bhai tum aman bhai ki emal id pe message send kr do
@satyjeetkumar1734
@satyjeetkumar1734 4 жыл бұрын
@@dewangsingh3376 bhieà email batànà please.
@snehilsinha4689
@snehilsinha4689 3 жыл бұрын
VS Code setup nhi hua hai tumhara thik se. Compiler read nhi kar raha. Google karo is error ko solution mil jayega.
@sumitmukharjee5816
@sumitmukharjee5816 3 жыл бұрын
your g++ is not set with vs code please refer to vs code c++ documentaion there it has been explained nicely
@ankishkhandelwal7588
@ankishkhandelwal7588 3 жыл бұрын
Bhai code save krna hai
@dhirajmahapatra1121
@dhirajmahapatra1121 4 жыл бұрын
AMAN BHAIYA TOLD HE WILL CONTINUE COLLEGE REVIEW SERIES BUT WHAT HAPPENED
@kunal1898
@kunal1898 4 жыл бұрын
We need Apne Performers🔥😆
@sarveshverma1794
@sarveshverma1794 4 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU xDD
@UJALA01
@UJALA01 4 жыл бұрын
Aman Bhaiya online bsc degree from iitm par video banao pls... Should i go for it or not? Pls batao...is it worth it or not? Pls pls batao...bahut confusion h
@innfinityraag7682
@innfinityraag7682 3 жыл бұрын
newtail ke next mein bhi toh NULL hoga
@millionaire-u
@millionaire-u 4 жыл бұрын
Hello bade bhai, BSc in data science ki career opportunities bta dejie, iit Madras wala course
@rankitgujjar80
@rankitgujjar80 3 жыл бұрын
can anyone please tell me why we did k=k%l. if the nodes are less shouldn't the linked list remain same
@akshayrahangdale8511
@akshayrahangdale8511 3 жыл бұрын
take example:- l=6 k=7 and value of k acc to k=k%l would be k=7%6=1, u just have to transfer last node to first. u can understand buy drawing the linked list transferring nodes,hope u will understand, if not accept it. h he eeeee
@kajalyadav_7
@kajalyadav_7 4 жыл бұрын
man memes video aani bnd hogyi.... why ❓ 🙄
@deepanshuvarshney478
@deepanshuvarshney478 3 жыл бұрын
ye sahi hai kya? void appendlastk(node* &head, int k){ int count = 1; node* temp= head; while(temp->next != NULL){ temp=temp->next; count++; } //count=size of linked list node* temp2 = head; int count2 = 1; while(count2 != count-k && temp2->next != NULL){ temp2=temp2->next; count2++; } node* temp3 = temp2->next; temp->next=head; temp2->next=NULL; head=temp3; }
@aakashthakre244
@aakashthakre244 3 жыл бұрын
Code not working for k >= l giving garbage value
@aakashthakre244
@aakashthakre244 3 жыл бұрын
Any help will be appreciated 😂
@harshgupta8180
@harshgupta8180 3 жыл бұрын
I think that the code doesn't work when k =1. Anyone please confirm.
@NormieCyrox
@NormieCyrox 3 жыл бұрын
K=k%l .....can anyone explain this part
@AnujKumar-ec7zz
@AnujKumar-ec7zz 2 жыл бұрын
this code is not vald for k=1and 0. Can u help me
@rajiv-59
@rajiv-59 2 жыл бұрын
k=0 and k=1 ke liye condition dal do code mein and reverse kr do.....
@niyomahor6252
@niyomahor6252 3 жыл бұрын
This code is not working for k=1 here is complete code:- node *append(node *&head, int key, int l) { node *tail = head; node *newtail; node *newhead; key = key % l; int count = 1; while (tail->next != NULL) { if (key == 1) { if (count == l - key) { newtail = tail; } if (count == l - key + 1) { newhead = tail; } tail = tail->next; count++; if (tail->next == NULL) { newhead = tail; } } else { if (count == l - key) { newtail = tail; } if (count == l - key + 1) { newhead = tail; } tail = tail->next; count++; } } newtail->next = NULL; tail->next = head; return newhead; }
@abhishek__anand__
@abhishek__anand__ 4 жыл бұрын
bhaiya aur bhi acche acche questions ek pdf m daal k de do tki kuch chute na
@atulraj8381
@atulraj8381 4 жыл бұрын
Notes kyu nhi upload ho rhe hai
@armanmd2604
@armanmd2604 4 жыл бұрын
Thanks bhaiya @amandhattarval
@VaibhaviYadav-b4h
@VaibhaviYadav-b4h 6 ай бұрын
Iss video mein padha Rahi Hain woh shraddha mam hain ya koi or hi
@deepanshjohri3997
@deepanshjohri3997 3 жыл бұрын
node* append(node *head,int k) { node* temp=head; while(temp->next!=NULL) { temp=temp->next; } temp->next=head; head->pre=temp; while(k!=1) { temp=temp->pre; k--; } temp->pre->next=NULL; return temp; } this is my approach
@ankishkhandelwal7588
@ankishkhandelwal7588 3 жыл бұрын
Bro node* datatype kyu liya
@ankishkhandelwal7588
@ankishkhandelwal7588 3 жыл бұрын
Means node*append
@ankishkhandelwal7588
@ankishkhandelwal7588 3 жыл бұрын
Plzz explain it
@HARIOM-yg5uy
@HARIOM-yg5uy 3 жыл бұрын
single LL mai next jaa skte h bss, previous nhi
@itsaryanguys
@itsaryanguys 4 жыл бұрын
❤️🙏
@mehakaggarwal295
@mehakaggarwal295 4 жыл бұрын
Bhaiya 10 SST ke notes dal do please
@sarveshverma1794
@sarveshverma1794 4 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU shobhit bhaiya ne daal diye hain
@rishabhrawatt
@rishabhrawatt 3 жыл бұрын
can anyone give me full code my code is not printing anything anyone can help me ??
@FaizAnsari-bu9ho
@FaizAnsari-bu9ho 4 жыл бұрын
Guys can you explain me k%l why..
@utkarshin
@utkarshin 3 жыл бұрын
k=k%l Could someone please explain to me this
@imrankhan-hi6nq
@imrankhan-hi6nq 3 жыл бұрын
love u mam
@bhagwansingh2370
@bhagwansingh2370 4 жыл бұрын
Please make a java course
@rahul_ji21
@rahul_ji21 3 жыл бұрын
Apni kaksa channel pe he
@noogler5314
@noogler5314 4 жыл бұрын
When she said : Chalo karte hai code bina kisi _____ deri ke😂 carry ka chehra instant saamne aya
@xundansingh5618
@xundansingh5618 4 жыл бұрын
Are bahiya python wala couse dalo
@jaychotalia7542
@jaychotalia7542 3 жыл бұрын
Anyone plz help me with one basic question Does linked list start with 1 indexing or 0 indexing ??
@rankitgujjar80
@rankitgujjar80 3 жыл бұрын
There is no indexing in the linked list. For reference, we use a head pointer which has the address of the first node
@jaychotalia7542
@jaychotalia7542 3 жыл бұрын
@@rankitgujjar80 okk thnxx broo..
@ABC-tm9ze
@ABC-tm9ze 4 жыл бұрын
Inorganic chemistry ke notes lalooooo🙏🏻🙏🏻
@anuragpandey3341
@anuragpandey3341 3 жыл бұрын
Ez...Pz...
@gauravbathla8666
@gauravbathla8666 4 жыл бұрын
Web development ki nahi aayi aaaj☹️☹️☹️☹️
@ujjawalrachhoya8972
@ujjawalrachhoya8972 3 жыл бұрын
This is not valid for k=0 and k=1
@SICSSonamSharma
@SICSSonamSharma 3 жыл бұрын
if(k==0) return; if(k==1) { temp=head; while(temp->next->next!=NULL) temp=temp->next; node *newtail = temp; node *newHead=temp->next; newtail->next=NULL; newHead->next=head; head=newHead; return; }
@KS-pb9ql
@KS-pb9ql 4 жыл бұрын
Bhaiya Ek channel hai Apna College naam ka ko ki fake hai aur fake news faila rha hai Just Search Why Anuj Bhaiya left Apni Kaksha U will get it.
@Shalinity
@Shalinity 3 жыл бұрын
Can someone please explain me why newHead =tail occurs?
@zaeemAtif
@zaeemAtif 3 жыл бұрын
because we want the value of the 'tail', in our newhead pointer, in that particular iteration. If you wanna know why we want that value, re-watch the explanatory part of the video, it will help insha'Allah😊
@anshumankumarnathshahdev3090
@anshumankumarnathshahdev3090 3 жыл бұрын
we r traversing it throught the hole linked list at first we consideres it as head,then taken it as new tain and finally declared tail= tail->next .
@saurabhshandilay8261
@saurabhshandilay8261 3 жыл бұрын
notes??????????????????
@snehilsinha4689
@snehilsinha4689 3 жыл бұрын
already in the linked list first video notes
@tejasjoshi9140
@tejasjoshi9140 4 жыл бұрын
Legends are waiting for webd course
@sarveshverma1794
@sarveshverma1794 4 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU trueee!!
@NEELESHJHARA
@NEELESHJHARA 3 жыл бұрын
iska include function koi bhejo plz
@adityabhandari6688
@adityabhandari6688 3 жыл бұрын
#include using namespace std;
@kailashsahoo1209
@kailashsahoo1209 4 жыл бұрын
When python course is coming, bhaiya
@sayankarmakar13
@sayankarmakar13 4 жыл бұрын
Every video came properly but where is web development videos ??
@sarveshverma1794
@sarveshverma1794 4 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU in conspiracy xDD
@rutvikrana512
@rutvikrana512 4 жыл бұрын
Questions on LL are quite simple, why wasting so many time on this ? Make all questions complication of LL in one video same as recursion videos. Just FYI, How many topics are remained ? Stack, Queue, Hash, Set, Tree, BST, Heap, Greedy, DP, graph, ... Please quickly upload videos 😩
@rahulkumarjha3556
@rahulkumarjha3556 4 жыл бұрын
I am the last viewer 🥺😭
@KartikeyaJain
@KartikeyaJain 4 жыл бұрын
no
@kailashchandrasoni799
@kailashchandrasoni799 4 жыл бұрын
I love you aman bhiaya , di aap please bol dena meri taraf se , mera nam roshni he or me ujjain se hu
@sarveshverma1794
@sarveshverma1794 4 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU shyd vo comments nahi padte
@ramanandcse8012
@ramanandcse8012 4 жыл бұрын
Neha kha gyi😭😭
@ernatertan1827
@ernatertan1827 4 жыл бұрын
First
@ernatertan1827
@ernatertan1827 4 жыл бұрын
We want 💓
@sarveshverma1794
@sarveshverma1794 4 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU dvs
Find Intersection point of 2 Linked List | Lecture 22.8
8:30
Apna College
Рет қаралды 123 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Reverse Linked List | EP 10
22:27
Fraz
Рет қаралды 36 М.
Watch this before you start Coding! 5 Tips for Coders
13:53
Apna College
Рет қаралды 482 М.
Single Linked List (Inserting a Node at the End)
5:49
Neso Academy
Рет қаралды 428 М.
Introduction to Linked Lists (Data Structures & Algorithms #5)
18:47