Materi Pertemuan 3 COMP6048 – Data Structure Linked List Implementation I Single Linked List To create a list, we first need to define a node structure for the list. Supposed we want to create a list of integers. struct tnode { int value; struct tnode *next; }; struct tnode *head = 0; Notes : “head” adalah pointer menuju ke elemen pertama pada linked list. Single Linked List: Insert To insert a new value, first we should dynamically allocate a new node and assign the value to it and then connect it with the existing linked list. Supposed we want to append the new node in front of the head . struct tnode *node = (struct tnode*) malloc(sizeof(struct tnode)); node->value = x; node->next = head; head = node; Notes: Oper...