Second Semester Summary
Hello, my name is Syafiq Maharaja. I am a student of binus university majoring computer Science. In this blog, I'm going to write a summary about things i've learned from datastruct so far
1. Circular Singly Linked List
In Single Linked List, we start with the first node and if we are somehow at any node in the middle of the list, we can't access the previous node. But we can solve this problem by changing the structure of a Single Linked List itself. In Single Linked List, the next node is NULL, if we use this link to the point of the first node, then we can reach the nodes that come before the "middle node".
The structure of Single Linked List looks like this :
2. Doubly Linked List
Doubly Linked List is one of Linked List Variations. Double Linked List has a two ways direction and can move back and forth between nodes, which every node has 3 spaces. For the first node, the first space is a NULL and the third space is to point to the next nodes. For the middle node, the first space was to point the previous nodes, and the third space was for the next nodes. And for the last node, the first space is to point the previous node and the third space is a NULL.
The structure of Double Linked List looks like this :
3. Circular Doubly Linked List
From what I've read Circular Doubly Linked List is basically a combination of Circular Singly Linked List and Doubly Linked List, which every node can point to the previous nodes or the next nodes while the last nodes points to the first node by next pointer and also the first node points to the last node by the previous pointer.
The structure of Circular Doubly Linked List looks like this :





Komentar
Posting Komentar