Skip to main content

Posts

Showing posts from March, 2020

RANGKUMAN PERTEMUAN 2

Untuk Blog materi GSLC 1 bisa di visit blog pertama saya di  https://indragunlinkedlistii.blogspot.com/2020/02/doubly-linked-list.html 1.coding linked list di audit 2.mengenai Stack dan Queue Berikut cara coding linked list di dev c dengan fungsi push,pop,dan cetak: #include<stdio.h> #include<stdlib.h> struct Data {     int value;     struct Data *next,*prev; }*head,*curr,*tail; void push(int a) {     curr = (struct Data*)malloc(sizeof(struct Data));     curr->value = a;          if(head==NULL){         head = tail = curr;     }     else{         tail->next = curr;         curr->prev = tail;         tail = curr;     }     head->prev = tail->next = NULL; } void cetak() {     curr = head; ...