Complete C++ Placement Course (Data Structures+Algorithm) : • C++ Full Course | C++... Telegram: t.me/apnikaksh... Instagram: / dhattarwalaman Notes of this Lecture:
Пікірлер: 182
@zaeemAtif3 жыл бұрын
yrr, kitna mast programming course he, iam feeling better at coding day by day. THANKS Aman bhaiya, but still can't thank you enough...!!!
@harshitrathi30774 жыл бұрын
VOTE FOR THE BEST COURSE OF APNA COLLEGE: LIKE : C++ DSA COMMENT : WEB DEVELOPMENT
@techramen16814 жыл бұрын
One ❤️ for our beloved teacher Didi..!!
@sarveshverma17944 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU suree
@DineshSharma-pp3ox3 жыл бұрын
❤️
@piyushbhatnagar78692 жыл бұрын
Tharki ho beta
@sachinbairi63533 жыл бұрын
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 " 😂😂
@divyanshpatel63223 жыл бұрын
same here 😂😂
@ankurkhandelwal13753 жыл бұрын
Same here 🤣🤣🤣🤣🤣
@tausifahmad20073 жыл бұрын
true😁😁
@rachitjaiswal82494 жыл бұрын
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
@sarveshverma17944 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU sureee
@SaurabhkochGohain3 жыл бұрын
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 ❤️
@vedantkhandelwal44543 жыл бұрын
This course is best for revision
@vedantkhandelwal44543 жыл бұрын
No bro this is best
@vedantkhandelwal44543 жыл бұрын
yes , you are right
@vedantkhandelwal44543 жыл бұрын
Yo bro got it
@vedantkhandelwal44543 жыл бұрын
Nice course by Aman d.
@vedantkhandelwal44543 жыл бұрын
Very good team of aman bhaoya
@sushilchaurasia4 жыл бұрын
Great bhaiya ❤️❤️❤️ Aman Bhaiya is best ❤️❤️❤️ 🔥
@sandipanmukhopadhyay19574 жыл бұрын
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
@sarveshverma17944 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU ryjs
@_rahulsain3 жыл бұрын
tab bhi time complexity o n rhegi
@webseriesworld17913 жыл бұрын
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
@obamaengineer48063 жыл бұрын
which yr r u in bro?
@its_neel_ok3 жыл бұрын
thanks bro
@sohanjangid12073 жыл бұрын
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; }
@yashvats47563 жыл бұрын
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
@ankitchowdhury17482 жыл бұрын
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)
@prodevmahi49013 жыл бұрын
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 }
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; }
@mrpro10548 ай бұрын
thanks bro i wasted my 3 our on this
@shaantyagi21873 жыл бұрын
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 !
@atharvjoshi21622 жыл бұрын
Head = newHead bhi hona chahiye tha na...? PS. Thank you so much for such an amazing playlist🙏
@Godspeed12193 жыл бұрын
Please bhaiya upload the notes of the lectures also along with the videos.
@adityabhandari66883 жыл бұрын
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!
@anshumankumarnathshahdev30903 жыл бұрын
excellent explanations
@sahilsawal6644 жыл бұрын
Nicely Explanation Ma'am :) 🔥👍👌✌
@hiteshjangid50403 жыл бұрын
this approach work only if k>=2
@rohitsharma75533 жыл бұрын
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
@shivammaurya34514 жыл бұрын
Thanks mam
@xundansingh56184 жыл бұрын
Kitne din wait krwawo ge wait krte krte sara c++ ka lecture dekh liye .i m in class 12 + cs branch
@harshwardhansingh83683 жыл бұрын
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; }
@spiritualanandashram34374 жыл бұрын
समय कीमती है, थोड़ा समय देकर हमारे आश्रम की योजना को जान लीजिए, देश की सेवा करने के साथ-साथ धन कमाने का अवसर.. For more information touch the link kzbin.info/www/bejne/e4HVqICNjZKUbck
@swatisharma8553 жыл бұрын
Bhaiya I am not able to access the notes . can you please help.
@shubhamtanwar64503 жыл бұрын
please Give full code from begining to end
@youreview57854 жыл бұрын
Finally first😉😉
@hemanthmali86294 жыл бұрын
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?
@sumitnarwani54174 жыл бұрын
Its correct because when k==L then the list comes back to original state and then consider k=2
@hemanthmali86293 жыл бұрын
@@sumitnarwani5417 Thank you
@anshumankumarnathshahdev30903 жыл бұрын
how they can call insertat tail function without declaring it . here they r using array instead of linked list
@anubhavgupta74183 жыл бұрын
coding ki text file ka link bhi description mai de diya kariye
@jitengarg57403 жыл бұрын
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
@shreyakanodia50713 жыл бұрын
We will not get output if k=1? Please help me how to solve this bug?
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.
@deepakrajgupta11773 жыл бұрын
why sometime we are using temp->next != NULL and sometimes temp != NULL?
@shubhamkale7353 жыл бұрын
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_tushar3 жыл бұрын
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
@avengerfirst15724 жыл бұрын
Great work mam
@fanframeorder40895 ай бұрын
notes kaha hai maam
@mukulchopra33783 жыл бұрын
Why at 03:10 the original tail is initialised by head ? Anyone please help
@deepshah13583 жыл бұрын
node *newList = kAppend(head, 1); is giving NULL as output. why?
@ShubhamPatil-uz9vb3 жыл бұрын
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; }
@desiidea65774 жыл бұрын
Bhaiya organic tu dal do plZ
@satyjeetkumar17344 жыл бұрын
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......
@dewangsingh33764 жыл бұрын
Bhai tum aman bhai ki emal id pe message send kr do
@satyjeetkumar17344 жыл бұрын
@@dewangsingh3376 bhieà email batànà please.
@snehilsinha46893 жыл бұрын
VS Code setup nhi hua hai tumhara thik se. Compiler read nhi kar raha. Google karo is error ko solution mil jayega.
@sumitmukharjee58163 жыл бұрын
your g++ is not set with vs code please refer to vs code c++ documentaion there it has been explained nicely
@ankishkhandelwal75883 жыл бұрын
Bhai code save krna hai
@dhirajmahapatra11214 жыл бұрын
AMAN BHAIYA TOLD HE WILL CONTINUE COLLEGE REVIEW SERIES BUT WHAT HAPPENED
@kunal18984 жыл бұрын
We need Apne Performers🔥😆
@sarveshverma17944 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU xDD
@UJALA014 жыл бұрын
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
@innfinityraag76823 жыл бұрын
newtail ke next mein bhi toh NULL hoga
@millionaire-u4 жыл бұрын
Hello bade bhai, BSc in data science ki career opportunities bta dejie, iit Madras wala course
@rankitgujjar803 жыл бұрын
can anyone please tell me why we did k=k%l. if the nodes are less shouldn't the linked list remain same
@akshayrahangdale85113 жыл бұрын
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_74 жыл бұрын
man memes video aani bnd hogyi.... why ❓ 🙄
@deepanshuvarshney4783 жыл бұрын
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; }
@aakashthakre2443 жыл бұрын
Code not working for k >= l giving garbage value
@aakashthakre2443 жыл бұрын
Any help will be appreciated 😂
@harshgupta81803 жыл бұрын
I think that the code doesn't work when k =1. Anyone please confirm.
@NormieCyrox3 жыл бұрын
K=k%l .....can anyone explain this part
@AnujKumar-ec7zz2 жыл бұрын
this code is not vald for k=1and 0. Can u help me
@rajiv-592 жыл бұрын
k=0 and k=1 ke liye condition dal do code mein and reverse kr do.....
@niyomahor62523 жыл бұрын
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__4 жыл бұрын
bhaiya aur bhi acche acche questions ek pdf m daal k de do tki kuch chute na
@atulraj83814 жыл бұрын
Notes kyu nhi upload ho rhe hai
@armanmd26044 жыл бұрын
Thanks bhaiya @amandhattarval
@VaibhaviYadav-b4h6 ай бұрын
Iss video mein padha Rahi Hain woh shraddha mam hain ya koi or hi
@deepanshjohri39973 жыл бұрын
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
@ankishkhandelwal75883 жыл бұрын
Bro node* datatype kyu liya
@ankishkhandelwal75883 жыл бұрын
Means node*append
@ankishkhandelwal75883 жыл бұрын
Plzz explain it
@HARIOM-yg5uy3 жыл бұрын
single LL mai next jaa skte h bss, previous nhi
@itsaryanguys4 жыл бұрын
❤️🙏
@mehakaggarwal2954 жыл бұрын
Bhaiya 10 SST ke notes dal do please
@sarveshverma17944 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU shobhit bhaiya ne daal diye hain
@rishabhrawatt3 жыл бұрын
can anyone give me full code my code is not printing anything anyone can help me ??
@FaizAnsari-bu9ho4 жыл бұрын
Guys can you explain me k%l why..
@utkarshin3 жыл бұрын
k=k%l Could someone please explain to me this
@imrankhan-hi6nq3 жыл бұрын
love u mam
@bhagwansingh23704 жыл бұрын
Please make a java course
@rahul_ji213 жыл бұрын
Apni kaksa channel pe he
@noogler53144 жыл бұрын
When she said : Chalo karte hai code bina kisi _____ deri ke😂 carry ka chehra instant saamne aya
@xundansingh56184 жыл бұрын
Are bahiya python wala couse dalo
@jaychotalia75423 жыл бұрын
Anyone plz help me with one basic question Does linked list start with 1 indexing or 0 indexing ??
@rankitgujjar803 жыл бұрын
There is no indexing in the linked list. For reference, we use a head pointer which has the address of the first node
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.
@Shalinity3 жыл бұрын
Can someone please explain me why newHead =tail occurs?
@zaeemAtif3 жыл бұрын
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😊
@anshumankumarnathshahdev30903 жыл бұрын
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 .
@saurabhshandilay82613 жыл бұрын
notes??????????????????
@snehilsinha46893 жыл бұрын
already in the linked list first video notes
@tejasjoshi91404 жыл бұрын
Legends are waiting for webd course
@sarveshverma17944 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU trueee!!
@NEELESHJHARA3 жыл бұрын
iska include function koi bhejo plz
@adityabhandari66883 жыл бұрын
#include using namespace std;
@kailashsahoo12094 жыл бұрын
When python course is coming, bhaiya
@sayankarmakar134 жыл бұрын
Every video came properly but where is web development videos ??
@sarveshverma17944 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU in conspiracy xDD
@rutvikrana5124 жыл бұрын
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 😩
@rahulkumarjha35564 жыл бұрын
I am the last viewer 🥺😭
@KartikeyaJain4 жыл бұрын
no
@kailashchandrasoni7994 жыл бұрын
I love you aman bhiaya , di aap please bol dena meri taraf se , mera nam roshni he or me ujjain se hu
@sarveshverma17944 жыл бұрын
kzbin.info/www/bejne/bqKYgGuqmaylpNU shyd vo comments nahi padte