+ 4
Double Linked list or Circular Linked List
My Lecturer give me time only 1 week to learn and code double linked list and circular linked list but I need more time to understand programming especially C. Which one I must learn first ? Double linked list or circular linked list ? And can you give me reason ? Thank You :) Sorry for bad english :)
3 Réponses
+ 6
You can alway do this:
Circular Doubly Linked List has properties of both doubly linked list and circular linked list in which two consecutive elements are linked or connected by previous and next pointer and the last node points to first node by next pointer and also the first node points to last node by previous pointer.
// Structure of the node struct node { int data; struct node *next; // Pointer to next node struct node *prev; // Pointer to previous node };
+ 11
Both of them are kind of linked list with tweaks. Maybe circular linked list is easy. You just link the first and last elements.
+ 3
Sir BroFarOps©®️™️the 🐱 has already given excellent explanation, however , I have in depth blog posts on Singly and Doubly Linked Lists already up on my blog. I will be releasing Circular Linked List this weekend. check it out!
https://code.sololearn.com/WdauYjg8rOiF/?ref=app
Hope it helps, happy coding!