Deletion in Linked List | C++ Placement Course | Lecture 22.2

  Рет қаралды 275,810

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:

Пікірлер: 201
@raohammadraza
@raohammadraza 2 ай бұрын
DIDI, I have been studying in this field for the last two years. I have watched many channels on KZbin in Hindi and Urdu, but this is the best of all, your channel.
@Newone-io6og
@Newone-io6og 7 ай бұрын
Thank you so much for making me realize that I dont understand it. I will sharp my focus. One thing I have noticed, that you have brilliant audience, the learner who understands everything in first iteration.
@kumarivandana1554
@kumarivandana1554 3 жыл бұрын
Considering some edge cases like: if the target is not present in the linked list or if the target is head but we don't have knowledge of this thing.. #include using namespace std; class node{ public: int data; node* next; node(int val) { data=val; next=NULL; } }; void insertAtHead(node* &head,int val) { node* n=new node(val); n->next=head; head=n; } void insertAtTail(node* &head,int val) { node* n = new node(val); if(!head) { head=n; return; } node* temp=head; while(temp->next) temp = temp->next; temp->next=n; } void display(node* head) { node* temp=head; while(temp) { coutnext) { coutnext; delete todelete; } int main() { node* head=NULL; insertAtTail(head,1); insertAtTail(head,2); insertAtTail(head,3); insertAtTail(head,4); insertAtTail(head,5); display(head); deletion(head,0); display(head); deletion(head,1); display(head); return 0; }
@savitosh9136
@savitosh9136 11 ай бұрын
works but it will lead to rise in space complexity more than required?
@harshvardhansingh780
@harshvardhansingh780 3 жыл бұрын
Dsa course of this playlist is not for the beginner .......but great work by whole team👍
@rahul_ji21
@rahul_ji21 3 жыл бұрын
Bhai dsa is just like language starting me kuch samaj nhi ata but baad me ho jata he
@sawanpatel3491
@sawanpatel3491 3 жыл бұрын
bhai me beginner hi hu sb samjh me aa rha h
@lovelydreams5610
@lovelydreams5610 2 жыл бұрын
Each concept used is described previously in playlist soo.. It is absolutely for beginners
@RoHit-ct7lr
@RoHit-ct7lr 2 жыл бұрын
Me beginner hi hu, ek baar me nahi samajh aata baar baar dekho
@pakeuropemedia6250
@pakeuropemedia6250 Жыл бұрын
Exactly
@danishfareed7858
@danishfareed7858 2 жыл бұрын
A very advanced lecture is not completely comprehensible to beginners. My suggestion is that beginners should learn these concepts first in college and then take this tutorial.
@justarandomguy1363
@justarandomguy1363 28 күн бұрын
Just jumped here to check the actual code teaching and yeah it seems solid. I could understand a little bit of the deletion part just following the logic even though I am a newbie. Ok jumping back to the beginner course I was in 😂
@mrprincekumarsingh2253
@mrprincekumarsingh2253 Жыл бұрын
Thank you for your guidance and support, esteemed teacher.
@anshumansinghsomvanshi4750
@anshumansinghsomvanshi4750 3 жыл бұрын
One another condition is not checked.. When the searching element is not present in LInked List then the loop is executing infinite times Missing condition : In while loop after temp->temp->next if(temp==NULL){ cout
@karmanyadadhich6172
@karmanyadadhich6172 3 жыл бұрын
Right observation, but the correct code will be: if(temp->next == NULL){ cout
@shadowmonarch3155
@shadowmonarch3155 2 жыл бұрын
@@karmanyadadhich6172 both are correct taking in account temp and next both are pointer...it is just that upper code loop will run 1 more times than yours
@shabankhan4383
@shabankhan4383 3 жыл бұрын
Finally i understand 😃😃😃, after this video, I’m creating , inserting at any position in linked list , deleting from any position, by my self. I can’t explain how much I’m feeling happy 😊, I love this course , thank you again the teacher and Aman Bhaiya ♥️🥺
@siddharthabhunia7897
@siddharthabhunia7897 2 жыл бұрын
InClude Deletion Operation #include #include using namespace std; // Create A class node class node{ public: int data; node* next; // Node Class Constructor node(int val){ data=val; next=NULL; } }; // Insert Element At Tail void insertAtTail(node* &head,int val){ node* n=new node(val); if(head==NULL){ head=n; return; } node* temp=head; while(temp->next!=NULL){ temp=temp->next; } temp->next=n; } // Deletion, Delete A particular Element //Corner Case When want to delete firts node void deleteAtHead(node* &head){ node* todelete=head; head=head->next; // Avoid Memory Leak delete todelete; } void deletion(node* &head,int val){ //For No Node present if(head==NULL){ return; } //For present only one node if(head->next==NULL){ deleteAtHead(head); return; } node* temp=head; while(temp->next->data!=val){ temp=temp->next; } node* todelete=temp->next; temp->next=temp->next->next; delete todelete; //Avoid Memory Leak } // Display All Element void display(node* head){ node* temp=head; while(temp!=NULL){ cout
@suryajoshi8947
@suryajoshi8947 2 жыл бұрын
thank you bro😇😇😇😇
@itzsam6113
@itzsam6113 Жыл бұрын
Thank you bhai
@rahulsaw8838
@rahulsaw8838 3 жыл бұрын
One more corner cases will be there if val is not present then.. So what we can do is we can call the ispresent function to check whether val is present and then call delete node function Else Print_lists
@kartheeksilpi5075
@kartheeksilpi5075 Жыл бұрын
void headdelete(node* &head){ if (!head) return; node* dele=head; head=head->next; delete (dele); } void delet(node* &head,int val){ if(!head) return ; //if head is null then there are no nodes to be deleted node* temp=head; if(temp->data==val){ headdelete(head); // deleting first node of linked list and returning it back. return; } while(temp->next != NULL && temp->next->data!=val){ temp=temp->next; }if(temp->next==NULL){ // if the deleted element is not presented return ; } node* del=temp->next; temp->next=temp->next->next; delete del; }
@schoolyourself877
@schoolyourself877 3 жыл бұрын
Grt work Aman
@VishalKumar-zb8nc
@VishalKumar-zb8nc 4 жыл бұрын
very nicely explained and take every variety of question in linked list
@deepakmodi9343
@deepakmodi9343 2 жыл бұрын
//More accurate code according to me void deleteAtHead(node *&head) { node *todelete = head; head = head->next; delete todelete; } void deleteNode(node *&head, int val) { if (head == NULL) { return; } node *temp = head; if (head->data == val) { deleteAtHead(head); return; } while (temp->next->data != val) { temp = temp->next; if (temp->next == NULL) { cout next = temp->next->next; delete todelete; }
@kapishsingh4529
@kapishsingh4529 3 жыл бұрын
One condition is not checked: if head->data==val; if(head->data==val){ deleteHead(head); return; }
@ranjitkoragoankar
@ranjitkoragoankar 3 жыл бұрын
bro that is the same condition as deleteAtHead();
@kapishsingh4529
@kapishsingh4529 3 жыл бұрын
@@ranjitkoragoankar this is not covered if you call delete directly and val is your head :)
@vrajeshmodi4928
@vrajeshmodi4928 3 жыл бұрын
@@kapishsingh4529 The mid condition in deletion function which is "if(temp->next==NULL) { deleteAtHead(head) return;}" which is the same as you make for 1 element in Linked list.
@gajeet6745
@gajeet6745 3 жыл бұрын
@@vrajeshmodi4928 No, @KAPISH SINGH is right!, try having more than one node, and then try to delete the node which happens to be the first node by passing the "head and val" to deletion() in which val happens to be the data of the first node. For example: Let's say the list is 100, 200, 300. and you call the function deletion(head, 100); Here comes the issue as the node containing data=100 is the first node (head node); The mid condition only check if head is the only node instead it should be if(head->next == NULL || head->data == val){ deleteAtHead(); return; }
@poulamipaul7964
@poulamipaul7964 3 жыл бұрын
The code that handles all the corner cases: bool search(node* head, int key){ node* temp=head; while(temp!=NULL){ if(temp->data==key){ return true; } temp=temp->next; } return false; } void deleteAtHead(node* &head){ node* toDelete=head; head=head->next; delete toDelete; } void deletion(node* &head, int val){ if(search(head,val)==true){ node* temp=head; if(head==NULL){ return; } if(head->next==NULL){ deleteAtHead(head); return; } if(head->data==val){ deleteAtHead(head); return; } while(temp->next->data!=val){ temp=temp->next; } node* toDelete=temp->next; temp->next=temp->next->next; delete toDelete; } else{ return; } }
@tushargupta2061
@tushargupta2061 3 жыл бұрын
rightly done👍
@aku_11_11
@aku_11_11 4 жыл бұрын
I think U r best in the world di. Plz take some important placement questions too di and make playlists of those.
@pradhanan9413
@pradhanan9413 4 жыл бұрын
Which year are you in?
@sourabhchoudhary7289
@sourabhchoudhary7289 4 жыл бұрын
These Videos are great no doubts!! But for Linked List I recommend to check Playlist of Simple Snippets . Love for Apni Kaksha Team😍
@maninax6615
@maninax6615 Жыл бұрын
Thanks a lot mam 🖤
@prasaddalwee7533
@prasaddalwee7533 3 жыл бұрын
Here is the error free code to delete nodes of linked list by their values. Note: 1. createlist() creates a linked list of size n dynamically 2. Open in your editor to see the code and comments properly #include using namespace std; class Node { public: int data; Node* next; }; Node* createlist(int n) { Node* head=new Node(); head->data=1; Node* node=head; for(int i=1;inext=node2; node2->data=i+1; node=node2; } Node* end=new Node(); //marks the end of LL with a NULL node node->next=end; end->data=NULL; return head; } Node* deletenode(int del, Node* head) { if(del==head->data) //del= data of first node return head->next; Node* temp=head; while(temp->next->data!=del) //loop till data of next node matches del { temp=temp->next; } temp->next=temp->next->next; //change link return head; } int main() { int n; cin>>n; Node* head=createlist(n); Node* temp=head; while(temp->data!=NULL) { cout
@SudakshinaMaitra
@SudakshinaMaitra 2 жыл бұрын
thanks man
@jaykoranga4859
@jaykoranga4859 Жыл бұрын
i was thinking the same , what if we have to delete the first node . thnxx
@UECAshutoshKumar
@UECAshutoshKumar Жыл бұрын
Thank you
@stardust857
@stardust857 2 жыл бұрын
My code for deletion, although I am a beginner, plz point out my mistakes. void delete_node(node* &head,int val) { node* temp=head; if(head->data==val) { delete head->next; head=temp->next; } else { while((temp->next)->data!=val) { temp=temp->next; } node* temp1=temp; delete temp->next; temp1=(temp1->next)->next; temp->next=temp1; } }
@tanmayasamaltk64
@tanmayasamaltk64 4 жыл бұрын
Great content 😍, no words to describe how thankful I am to the team Apna college🙏.
@vivek_1300
@vivek_1300 2 жыл бұрын
nice video
@harshpanwar1550
@harshpanwar1550 2 жыл бұрын
Thank u didi😄
@_rahulsain
@_rahulsain 4 жыл бұрын
If you need to copy the code, check this repo -> github.com/rahulsain/CPP-DSA
@abhishekkhare6175
@abhishekkhare6175 3 жыл бұрын
without delete at head function : void deletingANode(node* &head,int val) { node *temp=head; if (head==NULL) { coutdata==val) { node *todelete=temp->next; temp->next=temp->next->next; delete todelete; break; } temp=temp->next; } }
@ankitgupta1644
@ankitgupta1644 4 жыл бұрын
please add some brief dryrun at the end of the lectures , its a vital request to the apna college team
@summerkoushal679
@summerkoushal679 2 жыл бұрын
I'd a doubt ... When size of list is 1, there we are deleting the head. Don't we need to check whether head->data should be Val. Why we are deleting that head every single time when link list is of size 1.
@mjgaming7031
@mjgaming7031 6 ай бұрын
Yes today my professor taught you are right👍🏻
@sahilsawal
@sahilsawal 4 жыл бұрын
Thank You Maam :) 🙏🏻👍🏻✌🏻👌🏻😇
@pradhanan9413
@pradhanan9413 4 жыл бұрын
Which year student you are?
@r.h.4392
@r.h.4392 2 жыл бұрын
#include using namespace std; class node{ public: int data; node *next; }; void deleteNode(node* &head, int val){ if(head == NULL){ coutnext; } node *delnode = temp->next; temp->next = temp->next->next; delete delnode; // deleting the non-required allocated memory block ; } void deleteAtHead(node* &head){ // delete the node from first place node* delnode = head; head = head->next; delete delnode; } void display(node *head){ node* temp = head; while(temp!=NULL){ coutnext = two; two->data = 20; two->next = three; three->data = 30; three->next = four; four->data = 40; four->next = NULL; display(head); cout
@aftabyt3894
@aftabyt3894 2 ай бұрын
Didi ki voice pahale or ab m kafi farak hai. 😅
@madanmohan5661
@madanmohan5661 2 жыл бұрын
What to do if the value we want to delete is repeated sometimes in the linked list?
@Justin_Roy
@Justin_Roy 4 жыл бұрын
MAKE LONG VIDEO ON LINKED LIST please
@_rahulsain
@_rahulsain 4 жыл бұрын
Copy paste code from here -> github.com/rahulsain/CPP-DSA/blob/master/Phase%201%20Placement%20Specific/28.%20Linked%20List/implementation.cpp
@anuragpandey3341
@anuragpandey3341 3 жыл бұрын
Finally some animation work is present
@rajeevranjan3690
@rajeevranjan3690 Жыл бұрын
Heap memory wala smjha Diya hota it would be grt using destructor
@DexterMylove
@DexterMylove 4 жыл бұрын
Aman bhaiya and team OP
@nikitasingh105
@nikitasingh105 4 жыл бұрын
🙏 thanku bhaiya
@roaster2483
@roaster2483 3 жыл бұрын
Awesome series so far🥰
@islamulhaq4537
@islamulhaq4537 2 жыл бұрын
Didi yeh new node declare karta howa ap * kiun dalta ho wo pointer declare karan ka liya nai hota?? plz bata dain bahot confuse kar rha ha yeh
@mindspired
@mindspired Ай бұрын
😂😂 bhai isko samajhne k liya muje alag se course krna padega
@vaibhavpaliwal8686
@vaibhavpaliwal8686 3 жыл бұрын
DOUBT !!! Ma'am, I have commented "to_delete" node, as you can see below, the code is working properly, so why are we creating a node and then deleting that element. void deletion(node *&head, int val) { if (head == NULL) return; if (head->next == NULL) { deletionAtHead(head); return; } node *temp = head; if (temp->next->data != val) { temp = temp->next; } // node *todelete = temp->next; temp->next = temp->next->next; // delete todelete; }
@vaibhavpaliwal8686
@vaibhavpaliwal8686 3 жыл бұрын
Ma'am is this explanation correct !!! we are pointing to that node which we want to delete, this is done so that hume pata ho ki jo node hum delete kr the hai vo memory me kaha pe hai wrna memory leak ho jayegi.
@sahiljindal
@sahiljindal 4 жыл бұрын
If there's only one element present in the linked list, then it should be checked, instead of just deleting it 🙄, Also this deletion by value function only works correctly when there are unique values in the linked list, in case of repeating elements, it will delete the first occurrence of the element present in the linked list
@MohammadKhan-ld1xt
@MohammadKhan-ld1xt 4 жыл бұрын
Do you have a better option
@sahiljindal
@sahiljindal 4 жыл бұрын
@@MohammadKhan-ld1xt yess, definitely
@MohammadKhan-ld1xt
@MohammadKhan-ld1xt 4 жыл бұрын
@@sahiljindal how would you do it
@palashagrawal2343
@palashagrawal2343 4 жыл бұрын
so for that use while loop till temp=NULL and use if statement inside it to delete same occurrence value.
@strgglr4637
@strgglr4637 3 жыл бұрын
Missed 1 corner possiblity which is if we have only 1 element in our linked list then if we execute deletion() then that element will be deleted but it should only be deleted if deletion(head, the remaining element) is executed else it should return that element in display(head).
@paragramteke6739
@paragramteke6739 2 жыл бұрын
Consider 1->2->3 and we want to delete 1 then code fails as theres no check if(head->data == val) deletehead
@ankitgupta1644
@ankitgupta1644 4 жыл бұрын
brilliantly explained
@deepakparwani6343
@deepakparwani6343 3 жыл бұрын
I think this not work if we want to delete head ? @ApnaCollege
@sarathvaverinkal6695
@sarathvaverinkal6695 2 жыл бұрын
//below code addresses all the corneer cases for deletion. void deleteNode(node * &head,int dV){ node *temp = head; if(temp == NULL){ return ; } if(temp->data == dV){ deleteAtHead(head); return; } node *prev = NULL; while((temp->data != dV) && (temp->next != NULL)){ prev = temp; temp = temp->next; } if(temp->data == dV){ node *toDel = temp; prev->next = temp->next; delete toDel; } else{ cout
@yogeshsanap8453
@yogeshsanap8453 4 жыл бұрын
Please upload the same short video like this for every point or every question everyday. It will be easy to analyse the topic clearly in short video. BTW Great Explanation. Thank You.
@pradhanan9413
@pradhanan9413 4 жыл бұрын
Which year student you r?
@chitranshuvarshney4423
@chitranshuvarshney4423 3 жыл бұрын
Mam, Error is coming in the last when you delete the elements.
@abhishekgadewar4616
@abhishekgadewar4616 3 жыл бұрын
declare deleteAtHead function before deletion function
@ayushkamboj2812
@ayushkamboj2812 3 жыл бұрын
6:15 u should check that element is equal to val or not
@nissankumar9749
@nissankumar9749 3 жыл бұрын
yeah even i pointed that out
@daniyal04
@daniyal04 4 жыл бұрын
👍
@sakshithakur8465
@sakshithakur8465 4 жыл бұрын
Didi I don't mean to be rude but please tell me how am I suppose to study STL and all don't jump so much just for the sake of completing syllabus.
@Prashantkumar-ji5bp
@Prashantkumar-ji5bp 3 жыл бұрын
@sohamvyas5709
@sohamvyas5709 4 жыл бұрын
thank u bhaiya
@bscwala6841
@bscwala6841 4 жыл бұрын
Nice
@ScienceExplorer001
@ScienceExplorer001 10 ай бұрын
What is temp?
@JayantBansal
@JayantBansal 3 жыл бұрын
DOUBT - I just noticed that I am not putting '&" operator in the function parameter(yes i m declaring pointer variable)then too its working fine , so is it fine to not put it??, and since you are putting it what are the benefits? I am using -- void deletehead(node* head) RATHER then void deletehead(node* &head)
@JayantBansal
@JayantBansal 3 жыл бұрын
If anyone knows the answer please answer it.
@rheotv1859
@rheotv1859 3 жыл бұрын
Its not working on mine ...
@JayantBansal
@JayantBansal 3 жыл бұрын
@@anshumankumarnathshahdev3090 in void insertattail function if(head==NULL){ head=n; (add this ->)return ; }
@anshumankumarnathshahdev3090
@anshumankumarnathshahdev3090 3 жыл бұрын
thanks bro 😊
@music-00
@music-00 3 жыл бұрын
bro she used "&" just to make changes in head, if u use it directly it won't change the head in main function.
@avishkartembhurne2880
@avishkartembhurne2880 4 жыл бұрын
Aman bhaiya 12 notes kab ayenge
@ritikkaushik3493
@ritikkaushik3493 3 жыл бұрын
In last edge case you redirect to deleteAtHead function but what if the val that comes is not at the head. so we have to write this condition too. if(head->next==NULL && head->data==val){ deleteAtHEad(head);}
@abhishekgadewar4616
@abhishekgadewar4616 3 жыл бұрын
I guess she did this assuming that the term we want to delete is present in the linked list so if only one node is there then the term has to be at the head.
@ritikkaushik3493
@ritikkaushik3493 3 жыл бұрын
@@abhishekgadewar4616 In programming you have to take a base cases ... don't try to just assume .. code that edge case otherwise you will stuck in Test cases.
@abhishekgadewar4616
@abhishekgadewar4616 3 жыл бұрын
@@ritikkaushik3493 yes even I had this in my mind beacuse it is possible that there are like 1, 2, 3, 4 nodes present but the val we want to delete is 6 which is not in the list itself. So this has to be considered as well but to keep it simple for now she may have assumed that
@ritikkaushik3493
@ritikkaushik3493 3 жыл бұрын
@@abhishekgadewar4616 yupp👍
@AK-pv9lr
@AK-pv9lr 4 жыл бұрын
Why is this video not monetised
@gdsclncte
@gdsclncte 2 жыл бұрын
Please provide notes, it takes a lot of time to make notes by taking screenshots.
@abhisheksinha4456
@abhisheksinha4456 3 жыл бұрын
Last node ka handle kiya kya
@b.a.n2418
@b.a.n2418 2 жыл бұрын
osm
@Pankaj_kumr
@Pankaj_kumr 4 жыл бұрын
sir, why don't you enable monetization on these videos......................... ?
@rahul_ji21
@rahul_ji21 3 жыл бұрын
Because he wants education to be free for all
@ankitshrestha6481
@ankitshrestha6481 4 жыл бұрын
ek or case rhe gya deletion node from tail???
@BilalHussainButt
@BilalHussainButt 3 жыл бұрын
kuch samj nahi aa rahi bhut fast ⏩⏩ parha rahi han mam. Aur naa hi enough explanation hai. kindly check
@harshitmaheshwari7185
@harshitmaheshwari7185 4 жыл бұрын
bhaiya web d ke notes kab upload karoge
@patil_ji
@patil_ji 2 жыл бұрын
I am getting DeleteAtHead was not declared in this scope how?
@soumelee5661
@soumelee5661 2 жыл бұрын
nice :D
@ashishkhoiwal9330
@ashishkhoiwal9330 3 жыл бұрын
nice one
@23ritik
@23ritik 4 жыл бұрын
Please start DS algo using java which was left by anuj
@anormalgaming5262
@anormalgaming5262 4 жыл бұрын
Will you upload a course on c#? Plz reply
@praveentakpuriya5431
@praveentakpuriya5431 3 жыл бұрын
naa😁
@ThePurshottamKumar
@ThePurshottamKumar 4 жыл бұрын
Ye dereferencing of pointer ka error aa Raha hai is question m, use kaise solve kre
@Ansar_Abbas
@Ansar_Abbas 2 жыл бұрын
koi ap ky pechy laga howa hy kia ??????????? itna jaldi jaldi parha rhi ho mam || please sary students ko sath ly k chaly || is mai week student bhi hy aur like bhi ye bhi dheyan mai rakhy || I think ap mery is commnet ko ignore nahi kro gi.
@anujsaini4454
@anujsaini4454 4 жыл бұрын
Thnks bhaiya can we know that when this couse will be finished 🔥😘
@Whatever-jm2ul
@Whatever-jm2ul 4 жыл бұрын
Abhi phase 1 bhi nahi huya bhai
@anujsaini4454
@anujsaini4454 4 жыл бұрын
@@Whatever-jm2ul bro tere pass Intex h isse course ka ya link jaha se download ho jaye
@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..................
@softwaredev8132
@softwaredev8132 4 жыл бұрын
what is the code?
@cypher7536
@cypher7536 3 жыл бұрын
Donot give space in naming a file..
@mitanshi6893
@mitanshi6893 3 жыл бұрын
yrr aap bhut fast pdha rhe ho , or dry run bhi nhi kar rhe ho plz add some more explanation
@nottomention
@nottomention 3 жыл бұрын
Why you not added a tail pointer initially ? Because i think it will be more easy to delete. Correct me if i am wrong.
@tomtanner4013
@tomtanner4013 3 жыл бұрын
there is error in the code presented in the video i.e. if the key is not present we will get a error, for that I have made the below code void delete_key(node*&head,int key) { node *temp=head; //if the list is empty if(head==NULL) { coutnext==NULL) { coutnext; delete todelete;
@vandit_quantum
@vandit_quantum 4 жыл бұрын
Notes of this lecture : ??????
@spongycode
@spongycode 4 жыл бұрын
drive.google.com/file/u/1/d/1_vtC-_3yuIgqdTf-ARoItRYS8l6dxrHd/view?usp=sharing
@spongycode
@spongycode 4 жыл бұрын
@rushikesh mane in the description of first video of linkedlist
@spongycode
@spongycode 4 жыл бұрын
@rushikesh mane this is second video
@chandrakantkumarchoudhary1144
@chandrakantkumarchoudhary1144 3 жыл бұрын
when I am passing the first value of ll in deletion its not deleting it ...how should i modify the code
@arinsingh8329
@arinsingh8329 3 жыл бұрын
void deletion(node *&head,int val) { node*temp=head; if(temp->data==val) { head=temp->next; } else { while(temp->next->data!=val) { temp=temp->next; } temp->next=temp->next->next; } }
@esd45nikitagite56
@esd45nikitagite56 3 жыл бұрын
Notes plz
@roshankapur775
@roshankapur775 4 жыл бұрын
Bhaiyya discord server kab aayega
@logicoverflow1240
@logicoverflow1240 3 жыл бұрын
Iss lecture ke notes nahi ha
@noufalhallian4982
@noufalhallian4982 3 жыл бұрын
yr kindly pora code to btao. ese smjha rahi ho jese hamein pehle se sb kch ata ho.
@HimanshuSharma-sf1yv
@HimanshuSharma-sf1yv 4 жыл бұрын
First comment ... binod op
@hamdankhan1851
@hamdankhan1851 Жыл бұрын
Can you plz share source code ?? @Apna College
@mohammadanas7929
@mohammadanas7929 4 жыл бұрын
Thku mam❤️❤️
@varunchaudhary6101
@varunchaudhary6101 3 жыл бұрын
Aman bhaiya ...didi bhaag rhi hein ..thoda sa dheeme smjhati to bdiya hota....yeh revision course thodi na hai...fir bhi yeh course best hai..ab kya krskte hein ...nii smjhaaega to baar baar dekhna pdega
@pushparajbhutekar2677
@pushparajbhutekar2677 4 жыл бұрын
Web development ka jaldi dalo
@bhaibhai6865
@bhaibhai6865 3 жыл бұрын
bhaiya could u please give us the code of lectures??
@pratikshaw5744
@pratikshaw5744 3 жыл бұрын
in the description
@sawanpatel3491
@sawanpatel3491 3 жыл бұрын
@@pratikshaw5744 kha h bhai
@pratikkarad11
@pratikkarad11 3 жыл бұрын
plz add some brief explanation....
@mohakgidwani1505
@mohakgidwani1505 4 жыл бұрын
Notes ?
@dhruvrupareliya8287
@dhruvrupareliya8287 4 жыл бұрын
Bhaiya ho seke to plz android devlopment pe ak source banao na plz bhaiya!
@jeelpatel1477
@jeelpatel1477 4 жыл бұрын
Sir can chemical engineer do MS in computer science?
@notEleven
@notEleven 4 жыл бұрын
What if the node we want to delete is the last one... Isnt that another corner case??
@PulkitMalhotra
@PulkitMalhotra 4 жыл бұрын
yes
@sachinbairi6353
@sachinbairi6353 3 жыл бұрын
that is one of the corner cases but we can do that by deletion function bcoz for the last element their will be n-1 node and an n+1 node ( n+1 will be null) so, it will not throw an error.
@shreyak8333
@shreyak8333 3 жыл бұрын
Attach notes plz
@omsatpathy5455
@omsatpathy5455 2 жыл бұрын
5:45 humne already deleteAtHead() bna lia h so why do we need to check for one element in list? Can someone explain.Will really appreciate.
@randomotaku6684
@randomotaku6684 2 жыл бұрын
agar humne usse banaya hai toh use call karna zaruri hai na bro
@nehalansari735
@nehalansari735 4 жыл бұрын
Or kitna time lgaga c++ khatm hone me?
@anuragpandey3341
@anuragpandey3341 3 жыл бұрын
Abhi tak nhi khatam hua ......
@nehalansari735
@nehalansari735 3 жыл бұрын
@@anuragpandey3341 na
Reverse a Linked List | C++ Placement Course | Lecture 22.3
9:03
Apna College
Рет қаралды 310 М.
Introduction to Linked List | C++ Placement Course | Lecture 22
15:17
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
How to make Notes for Coding? Data Structures & Algorithms
19:29
Apna College
Рет қаралды 1,5 МЛН
Single Linked List (Deleting the Node at a Particular Position)
9:43
How to Create a Linked List C++ Introduction to Linked Lists
12:24
Paul Programming
Рет қаралды 947 М.
Lec-20: Traversing in Linked list | Data Structure
12:38
Gate Smashers
Рет қаралды 127 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.