C++ Program to Implement Circular Linked List Data Structure (Full Code) | Part - 2 | DSA

  Рет қаралды 38,869

Simple Snippets

Simple Snippets

Күн бұрын

Пікірлер: 61
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Hey Guys, if you want more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends as it helps me create more content just for you ✌
@konstantinosdrakakis5263
@konstantinosdrakakis5263 2 жыл бұрын
at lines from 195 to 215 you don't need to do this , with this way , because uou have the function tha checks if the node with a paticular key exists
@abrarahmad9687
@abrarahmad9687 Жыл бұрын
I use the code of simply link list and alter it for the functioning of a circular one, is it okay, I feel more comfortable with it?
@komaldeepsingh6356
@komaldeepsingh6356 3 жыл бұрын
There is a little error in this code. If there is only one node in the Whole list, then on deleting it, it still dont get unlinked . The mistake is in the line 178 at timestamp of 25:38 where we should write if(head -> next = head) instead of (head -> next = NULL) because it is a circular linked list. I am watching this video 3rd time for revision, and noticed it now. I know its just a little mistake which is normal and can be made by anyone but dont know why I am feeling very good after finding it out😂😂. Now I feel that I have understood the code nicely. BTW, I love ur videos bhaiya💖💖💖💖💖💖
@ishanrai3951
@ishanrai3951 3 жыл бұрын
i was just going to comment about this mistake lol xd
@kushal6065
@kushal6065 3 жыл бұрын
@@ishanrai3951 but in cicrular linked list there is no NULL. then why he used NULL?
@ishan10s
@ishan10s 3 жыл бұрын
@@kushal6065 replace it with head he must have done it by mistake
@kartikpaliwal9654
@kartikpaliwal9654 2 жыл бұрын
@@kushal6065 using null is a mistake
@СарварбекКабулов-к9я
@СарварбекКабулов-к9я 7 ай бұрын
but he mentioned that instead of NULL there should be HEAD
@kushal6065
@kushal6065 3 жыл бұрын
At 28:24 you made too much complicated for my small brain, so i found my own easy way. Instead of doing writing all that else part after line no. 195, We can simply write this less code and works perfectly: else { Node* p = head; while(p->next!=ptr) // we know that "ptr" has the address of that node we want to delete { p = p->next; } p->next = ptr->next; free(ptr); cout
@ryanphung3858
@ryanphung3858 3 жыл бұрын
just subscribed. These linked list videos have been super helpful! I really enjoyed the drawings, it made the concepts so much easier to understand! Thanks for putting the time to make these vids :D
@desrucca
@desrucca 3 жыл бұрын
I just have sucessfully made doubly-circular linked list, thanks to ur vids.
@vivekmunna
@vivekmunna 4 жыл бұрын
You are awesome teacher. Just completed all 16 videos.
@mdaslamali9269
@mdaslamali9269 4 жыл бұрын
Happy teachers day sir!! From u i have learn't the data structure.
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Thank you very much Ali. Glad to know my videos have helped you ✌
@amirtv345
@amirtv345 2 жыл бұрын
Thank you so much, Love from Pakistan, Bro you have helped me a lot, I'm a final year student of computer science, But I couldn't understand these concepts from my university, I am following your data structure course and working until i get full comfortable with the data structure, God bless you. Tanmay Sir
@abdullahmaqsoodhere
@abdullahmaqsoodhere Жыл бұрын
Which university are you from?
@jamesnash9675
@jamesnash9675 2 жыл бұрын
you r the best..............masum
@ChandrapalSd
@ChandrapalSd 4 жыл бұрын
Please cover the topic of non linear data structures.
@ThatLLMGuy
@ThatLLMGuy 5 жыл бұрын
Hey bro. Remember me? I was waiting quietly without appreciating to see that how long you continue this series. (I watched all the vids...)... And I saw that you are quite dedicated to this work.... Just keep it up bro... You are awesome
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Hi buddy yes ofcourse I remember you 😇 And thank you so much bro for the positive feedback. Means a lot to me especially because these DS videos take a lot of time and effort. You can see from the video length also that these videos are very lengthy but they are very detailed too so takes a lot of efforts in post editing work too ✌
@ThatLLMGuy
@ThatLLMGuy 5 жыл бұрын
@@SimpleSnippets yes I know... And I was waiting for how long you can continue. Please continue this.... :D...
@dejan9851
@dejan9851 3 жыл бұрын
Hey bro this videos is awesome you are best teacher. Are you working somewhere when you learned C++ and other things how long have you been programming I am interested in what the salary is and what is enough for the job.
@pranavpatki
@pranavpatki 4 жыл бұрын
20:04 why do we need 2 conditions ?? Why do we need to specifically mention if ptr is head or not ? The node can be inserted without that also right ?? Pls correct me if i am wrong.
@brahmkaransingh8804
@brahmkaransingh8804 4 жыл бұрын
Yes you're right . I have also come in comments to mention this and found yours
@jayeshyedge7171
@jayeshyedge7171 5 жыл бұрын
Hey bro thanks for this video!!!!!!
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Most welcome Jaysesh. Thanks for your comment. Please do share the video with your friends too 😇
@bozhou1454
@bozhou1454 4 жыл бұрын
line #147 to #158, can we combine them? since we do not need to consider if(ptr.next==head). #149 and #155 actually are the same, as when ptr.next==head, ptr.next==head. so, we can cancel the if/else and only retain line#155 to #157
@sharmeenkhanam2924
@sharmeenkhanam2924 5 жыл бұрын
Hey Tanmay can please upload further videos of this series ASAP. Because I have to sit in many interviews and without your tutorial I can't clear the technical round
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Hello sharmeen, well I'm trying to make videos as fast as possible. As you must've seen, these videos are pretty lengthy and take up too much time and effort compared to other subjects cause DS videos need theory + practical explanation and on top of that I also have to try and demonstrate the working visually which adds more efforts 😅 Having said that, surely I'll try to upload as fast as I can but in the mean time try to checkout other resources too like geeksforgeeks etc. All the best for your interviews 😊 Do follow my Instagram handle too - instagram.com/simplesnippets
@sharmeenkhanam2924
@sharmeenkhanam2924 5 жыл бұрын
@@SimpleSnippets Thank you for your quick response. Do you have any future planning of making videos on Machine learning?
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Well I am not well versed in ML especially the practical side of it. However, I would definitely collaborate with some expert in future for some ML videos. 😇 Or maybe myself learn a few things and share it with everyone ✌
@sharmeenkhanam2924
@sharmeenkhanam2924 5 жыл бұрын
@@SimpleSnippets You're doing such a noble job👏👏🙌 God bless you!
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Thank you so much Sharmeen, happy to help 😇 I would request you to please share the videos and our channel with your friends too so that we can reach out to more users and students who will benefit from these tutorials ✌😇
@ramadanaliyii4284
@ramadanaliyii4284 Жыл бұрын
good i am appreciate you
@sriramnagarajanit
@sriramnagarajanit 5 жыл бұрын
Hi Simple Snippets, Could you please make all the courses as a fully length video. That would much useful to continously watch.
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
I might do that in future after completing the full course. But I am not keen on doing that. Nobody watches the full length video completely. Mostly users prefer topic by topic full playlist so you can choose what you want to watch ✌
@sriramnagarajanit
@sriramnagarajanit 5 жыл бұрын
@@SimpleSnippets Yes i agree upon you. Jus set one full length course for c++ once you have completed. Thanks✌🏻
@teetanrobotics5363
@teetanrobotics5363 5 жыл бұрын
@@SimpleSnippetsJust keep it as it is.It's perfect
@dhanarajjangi2926
@dhanarajjangi2926 4 жыл бұрын
Hey bro... in checknodeexist it is possible to set ptr as head next and then apply while loop.....
@jayuchawla1892
@jayuchawla1892 3 жыл бұрын
// Some code reuse void prependNode(Node *n) { // the only difference between prepend and append is: prepend requires head to be pointed to latest inserted node appendNode(n); head = n; }
@abhishekhm.s6945
@abhishekhm.s6945 2 жыл бұрын
spr bruh..i only realized after seeing ur comment
@hadiar1573
@hadiar1573 3 жыл бұрын
Great Video! Just a question tho. in the DeleteNode method, shouldnt the condition for the currentpointer in the while loop be while(currentpointer->next != head) ? please explain this, im very confused. because Currentpointer is never going to bull since its a circular Linked list??
@algorithmo134
@algorithmo134 3 жыл бұрын
@Simple Snippets For deleteing a node with key value k; the code should be like this; In the else part see below *** It should be like this. if (ptr == head){ if (head -> next == head) ..... } INSTEAD OF if (ptr == head){ if (head -> next == NULL) ..... } Correct code: void deleteNodeByKey(int k) { Node *ptr = nodeExists(k); if (ptr == NULL) { cout next = head -> next; head = head -> next; cout next; currentptr = currentptr -> next; } } prevptr -> next = temp -> next; cout
@arnabpratihar3
@arnabpratihar3 3 жыл бұрын
How constructer node(int k ,int d)is called?? There is no such object node n1(4,5);how dynamic allocation in this part worked ??thanks for amazing tutorial
@sakshisinghal1669
@sakshisinghal1669 4 жыл бұрын
in the insertNodeAfter() when the condition comes to insert a node then I am not getting why two conditions are taken for it because when you have checked if(ptr->next == head) then you are assigning head only in the newNode->next which is same as assigning newNode->next = ptr->next and that is exactly the same as in the else part. kindly check please
@rishabhtatia3444
@rishabhtatia3444 4 жыл бұрын
In delete node after inserting one node it will not delete.It should be head->next == head.Line 178
@anushkayadav6413
@anushkayadav6413 3 жыл бұрын
Same doubt
@IamImranMalik
@IamImranMalik 2 жыл бұрын
Sir, your delete function is not working correctly
@ChandrapalSd
@ChandrapalSd 4 жыл бұрын
Please increase the frequency of uploading videos.
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Its not really possible to increase the frequency as these topics take up a lot of time and effort in prepping up the content and working on the teaching style. Infact many times I have to take more than 1 take because I am not satisfied with my own teaching so complete 1-2 hrs of video recording gets wasted. Hope you understand. However, since I am only focussing on DSA right now, videos in this playlist will keep coming up without any other interruption 😇✌
@ChandrapalSd
@ChandrapalSd 4 жыл бұрын
@@SimpleSnippets Ok brother. And keep providing us this high quality content 😘🤗
@expert77
@expert77 Жыл бұрын
@paritoshkashyap5219
@paritoshkashyap5219 4 жыл бұрын
Thanks, Tanmay for guiding us Maine circular linked list ka pura code smjha or mujhe smjh bhi aya But jb mae usse online c++ compiler pr use kr raha hu toh vo error dikha raha hai I have learned the code of circular linked list but when I am applying it on online c++ compiler, there are some errors In fact I have copied and paste your provided code of circular linked list in the link and try it once to run but There are errors I m using this 👇 www.onlinegdb.com/online_c++_compiler Plzz if anyone can help me out and tell me where is the problem, Thank you
@hobbycoding7056
@hobbycoding7056 2 жыл бұрын
You suggested to see the previous video.. but didn't give the link of that video in the discussion... please don't do that. This thing will reduce ur views
@gamsterilyass2952
@gamsterilyass2952 5 ай бұрын
❤❤
@kushal6065
@kushal6065 3 жыл бұрын
I thought that there was no NULL in circular linked list.....
@vivekmunna
@vivekmunna 4 жыл бұрын
You are awesome teacher. Just completed all 16 videos.
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
That's great to know buddy, please do share our channel and videos with your friends too, that's the biggest help and support you can provide buddy ✌
@gamsterilyass2952
@gamsterilyass2952 5 ай бұрын
❤❤❤
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Circular Linked List
21:29
CppNuts
Рет қаралды 8 М.
C++ Program to Implement Singly Linked List Data Structure | Part 2 | DSA
1:01:59
Learn C++ With Me #20 - Functions
26:14
Tech With Tim
Рет қаралды 57 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН