Please do upload it completely, this series is gonna save my life.
@prateekbaheti82364 жыл бұрын
One of the best series I have ever watched on KZbin to learn topics related to CSE. Sir, please organise live interaction sessions.
@CodeCampus_14 жыл бұрын
Sir please upload all the video of the Ds algo I have to give my semester exam And you really explained too good I am getting all you explained Please upload all topics asap Best Ds lecture on KZbin ❤❤
@zafdell81704 жыл бұрын
Yes really need this type of content
@balakrishnaprasad89284 жыл бұрын
Please upload the dsa videos as fast as possible because our exams are coming . We know that you are keeping complete efforts on making a video not only video to clear concept .
@mohammedafnanshariff3142 Жыл бұрын
Thank you so much sir. I wish you and your family good health and loads of happiness. Thank you again for this wonderful work!
@YashKumar-br5xi2 жыл бұрын
gigantic amount of help we are receiving only because of your mindset and your beliefs
@vijaygarothaya66733 жыл бұрын
This can be done by one more option: Assume doubly link list like below head-> N1 -> N2 -> N3 -> N4 Suppose we need to add NX after N2 1. Traverse thru list to reach N2. Call N2 as currentNode. 2. Add NX between N2 and N3 NX.prev = currentNode NX.next = currentNode.next currentNode.next = NX NX.next.prev = NX
@DILESHCHURIWAL4 ай бұрын
We can also do it without temp2 pointer. newP->next = temp->next; temp->next->prev = newP; temp->next = newP; newP->prev = temp; Also we should check the condition if(temp->next==NULL) before this.
@dipeshsamrawat79573 жыл бұрын
I love Neso Academy :)
@tejatej36284 жыл бұрын
Thank 🙏💕u sir. Plz upload the videos fastly...
@gulabpatel12494 жыл бұрын
Sir while loop will be become infinite loop am i right...
@CodeCampus_14 жыл бұрын
Sir please jaldi upload krdo sara course sem kaa exam dena hai kuch nhi padha hai Poora DS padna hai aur apne sach me kafhi acha explain kiya hai Please jaldi upload kr do whole course ✌✌
@sayemaroyali31004 жыл бұрын
Try English. Hindi aati hogi kya usko?
@CodeCampus_14 жыл бұрын
@@sayemaroyali3100 may be ati ho😁😅
@siphethonyambi4413 жыл бұрын
why not use *head instead of *temp to reduce the number of pointers you're using since head is difined as a local variable inside your function?
@lawn_mower49413 жыл бұрын
you cant change where head is pointing. head must always point to first node, thats why you can only traverse using head and not update
@mohamedimadeddinefaoussi696611 ай бұрын
in case the position is out of range , this case should return NULL because we can't add the node in an out of range position
@satyamkumar64692 жыл бұрын
You explained very well but you didn't discuss any corner cases
@madhuritolambe8983 жыл бұрын
sir can we implement this using only one ptr i.e temp only... rather than both temp and temp2?
@AnkitYadav-sc2sm3 жыл бұрын
Yes👍
@AbcnaihauHnahUznnz2 жыл бұрын
//insert at any position except last myNode* add_at_any_pos(myNode *head, int data, int pos){ myNode *ptr = NULL; myNode *temp = head; if(pos == 1) add_at_beg(&head, data); else if(pos == (no_of_nodes(head) + 1)) printf("Invalid Position "); else{ ptr = malloc(sizeof(myNode)); ptr->prev = NULL; ptr->data = data; ptr->next = NULL; pos--; // change temp if pos > 2 else below while(--pos){ temp = temp->next; } temp->next->prev = ptr; ptr->next = temp->next; temp->next = ptr; ptr->prev = temp; } return head; }
@aniketmasram65002 жыл бұрын
Thnks a lot for this 🙏🏻🙏🏻🙏🏻
@okenk.63798 ай бұрын
at 3:36 shouldn't the prev node fore newP be linked to the next node of the temp?
@成成成-b1q Жыл бұрын
much obliged to you sir
@golamkibria4310 Жыл бұрын
Dear sir, why do we need to newP=addToEmpty(newP,data).instead of this malloc for newP
@anishlowanshi77662 жыл бұрын
Thank you ❤️
@kumarik90273 жыл бұрын
dear sir, will you please explain me about doubly linked list using strings? thank you.
@ritvikreddy3959 Жыл бұрын
hey it is simple just replace the int data to char data[size of string] and use %s while taking the input i.e in scanf
@soumayadahel89893 жыл бұрын
i didn't understand the part of 'position -- ' any help pls?
@tahreemriaz24013 жыл бұрын
I am using dev c++ i write same code on dev, but something went wrong soo plz tell me which software you use or also if i use dev c++ , so what's i change in my program
@harshalkumar45383 жыл бұрын
he's using codeblocks
@tahreemriaz24013 жыл бұрын
@@harshalkumar4538 thank you so much😊
@lawn_mower49413 жыл бұрын
that's because the sequence of pointer updations is wrong
@sumyea10093 жыл бұрын
Whether I want to avoid the newp=addtoempty(newp,data) . What should i write? it will work with temp->data or temp2->data. ?
@ATHULSHA-i9b8 ай бұрын
me watching night before exam
@tahreemriaz24013 жыл бұрын
which softeware sir used plzz anyone tell me
@AishLovesSpaghetti3 жыл бұрын
Code blocks
@tahreemriaz24013 жыл бұрын
@@AishLovesSpaghetti thank you so much😊
@keshavramvishvakarma91004 жыл бұрын
NewP = addToEmpty(newP , data) In this line why newP is pass???
@duanedsilva4 жыл бұрын
bcus the function return value is saved. hence it can be pass by value
@rockstarCoolz2 жыл бұрын
🙏🙏🙏🔥
@Codehatch3443 жыл бұрын
Sir i have written source code same as yours but got an error on codeblocks. Error: Process returned -1073741819 (0xC0000005) execution time : 0.896 s Press any key to continue. nothing is printing on console could you resolve this problem as soon as possible as all the things are exact same and even rechecked three times i am not getting it, I am attaching source code even for your consideration i will wait for your response. #include #include #include struct branch { struct branch* prev; int data; struct branch* next; }; struct branch* inserttoempty(struct branch* head,int data) { struct branch* temp = (struct branch*)malloc(sizeof(struct branch)); temp->prev = NULL; temp->data = data; temp->next = NULL; head = temp; return head; }; struct branch* insertinbeg(struct branch* head, int value) { struct branch* newnode = (struct branch*)malloc(sizeof(struct branch)); newnode->prev = NULL; newnode->data = value; newnode->next = head; head->prev = newnode; head = newnode; return head; }; struct branch* insertatend(struct branch* head,int value1) { struct branch* trav; struct branch* newnode = (struct branch*)malloc(sizeof(struct branch)); trav = head; newnode->prev = NULL; newnode->data = value1; newnode->next = NULL; while(trav->next!=NULL) { trav = trav->next; } trav->next = newnode; newnode->prev = trav; return head; }; struct branch* addbeforepos(struct branch* head,int data,int position) { struct branch* newP = NULL; struct branch* temp = head; struct branch* temp2 = NULL; if(head==NULL) { newP = inserttoempty(newP, data); } int pos = position; while(pos>2) { temp = temp->next; pos--; } if(position==1) { insertinbeg(head,data); } else { temp2 = temp->next; temp->next = newP; temp2->prev = newP; newP->next = temp2; newP->prev = temp; } return head; }; int main() { struct branch* head = NULL; struct branch* ptr; int position = 2; head = inserttoempty(head,45); head = insertinbeg(head ,98); head = insertatend(head,3); head = addbeforepos(head,56,position); ptr = head; while(ptr!=NULL) { printf("%d",ptr->data); ptr = ptr->next; } return 0; }