Sir, you are an excellent teacher and I thank you for your hard work.
@anabrr2 жыл бұрын
You are incredible, I don't know what would I do without you. Thank you so much!!
@ayushmanpraxri70634 жыл бұрын
Sir you're awesome thank you so much Makin these videos free you've cleared all of my doubts please keep making more data structures videos thanks again
@memenator1853 жыл бұрын
I learned a lot from your videos, thank you so much :)
@unexxzzz8186 Жыл бұрын
Sir, You are a true legend thanks alot
@ThatiMoreira4 ай бұрын
Thanks a lot! Your videos are helping me so much!!!
@abdulazizalramadan8019 ай бұрын
Man thank you very much iam struggling in my data structure subject and u helped me alot with this linked list videos
@idomark1238 Жыл бұрын
bro gonna help me pass the next semester thank you sir
@benogega2543 Жыл бұрын
An excellent explanation......
@jenny127832 Жыл бұрын
Very helpful, thank you!
@user-jv7of9tp6g4 ай бұрын
Just fantastic🌷
@adirk12592 жыл бұрын
Thanks you master teacher
@flames10873 ай бұрын
I Love your Teaching 💖
@alasassi9602 жыл бұрын
what a great teacher
@loukman4191 Жыл бұрын
Thank you 💕
@vambans24124 жыл бұрын
Great course
@PachucoDesigns4 жыл бұрын
Can you explain to me the difference between using arrow and using dot when referencing an attribute of a node? Because curr->x and curr.x seem to do the same thing.
@CodeVault4 жыл бұрын
curr.x; // Gets the x property from curr (where curr is a struct type) curr->x; // Gets the x property from curr (where curr is of pointer to struct type) Essentially, curr->x is a shorthand for (*curr).x, dereferencing curr then accessing the x property
@alexneagoe52582 жыл бұрын
I think this was very good, thank you for this, it was an instant subscribe! I have a question. could the loop that you have used for printing, be modified in order to be used to with free? I could make the while loop work by swaping a temp value assigned with the next node with the current node value after free and using the current node !=NULL in the condition, but with for loop it wouldn't work, I would get funny valgrind errors (either would free the heap but with stack errors, or would memory leak the heap).
@CodeVault2 жыл бұрын
Cred ca asta ar trebui sa functioneze, am scos incrementul din for loop ca trebuie sa ai o variabila auxiliara dupa cum ai zis: for (Node* curr = &root; curr != NULL;) { Node* aux = curr->next; free(curr); curr = aux; } I guess, daca chiar vrei incrementul poti sa faci asta: Node* aux; for (Node* curr = &root; curr != NULL; curr = aux) { Node* aux = curr->next; free(curr); }
@alexneagoe52582 жыл бұрын
@@CodeVault salutare și mulțumesc de replyul foarte rapid, nu mi-am dat seama prima oară de unde ești. Am încercat ambele variante și au mers fără probleme (nu știam că pot face asta, sunt foarte bucuros că for loop poate fi manipulat cu un increment oarecum fake) // for loop without increment for(node *tmp = list; tmp != NULL;) { tmp = list->next; free(list); list = tmp; } // for loop with increment for(node *tmp = list; tmp != NULL; list = tmp) { tmp = list->next; free(list); } valgrind îmi arată că e totul ok!! Mulțumesc încă o dată, am învățat ceva nou și voi avea grijă să mă uit la celelalte materiale pe care le ai pentru C. Sunt la început deocamdată :)
@CodeVault2 жыл бұрын
Mult succes in continuare!
@karimdhrif66792 жыл бұрын
i love you man
@fadieid5638 Жыл бұрын
Thank you for this amazing explanation. Just wondering, shouldn't we cast the malloc(sizeof(Node)) into a pointer to Node? malloc return void* type and we are assigning it to Node*
@CodeVault Жыл бұрын
I did some research on this and, in C++ it's recommended you cast the result of malloc, in C it is not
@fadieid5638 Жыл бұрын
Thank you, Intellisense on VS code was turning on this red squiggly line under the malloc signaling type mismatch
@huseynadze79337 ай бұрын
Hello, is stopping the iteration with ==NULL always safe? can't we mark the last one with "tail pointer" while adjusting to our linked list, and then while iterating we can check if the the current is equal to "tail"?
@CodeVault6 ай бұрын
It's not quite safe if you end up with cycles in the linked list (it can iterate forever)... The solution you wrote wouldn't be much safer since the cycle could end up not including the tail node thus iterating forever again
@huseynadze79336 ай бұрын
@@CodeVault makes sense, thank you :)
@C0D3O3 жыл бұрын
thank you:) but do you know how to iterate elements in a vue recycler scroller list??????:)
@CodeVault3 жыл бұрын
I don't know much about vue
@forheuristiclifeksh783619 күн бұрын
1:44
@mongraal22722 жыл бұрын
but root should be on heap,not on stack
@CodeVault2 жыл бұрын
In our case it's on the stack because of the definition (Node root). But you can define it on the heap if you want