Postingan

Menampilkan postingan dari Februari, 2018

2 - Linked List Implementation I - 2101702130 - Andrean

Gambar
Pertemuan ke - 2 27-02-2018 Linked List: - Single Linked List Simplest linked list.  Define a node structure : struct tnode {   int value;   struct tnode *next; }*head=NULL,*tail=NULL,*curr; head is the pointer for the first element in our linked list. tail is the pointer for the last element in our linked list. Insert Head: struct tnode *node =  (struct tnode*) malloc(sizeof(struct tnode)); //make a new node node->value = x; node->next  = head; head = node; Tail: struct tnode *node =  (struct tnode*) malloc(sizeof(struct tnode)); //make a new node node->value = x; node->next  = NULL; tail->next = node; tail = node; Delete // if x is in head node if ( head->value == x ) {   head = head->next;   free(curr); } // if x is in tail node else if(tail->value == x){   while(curr->next!=tail) curr = curr->next; ...

1.2 - Guest Lecture Mr.Samuel Theodorus - 2101702130 - Andrean

Digital Marketing  is the marketing of products or services using digital technologies, mainly on the Internet. Example of Google Adwords : Google Search Google Display Network Youtube Ads Email Ads

1.1 - Pointer, Array and Introduction to Data Structure - 2101702130 - Andrean

Gambar
Pertemuan ke-1 20-02-2018 Array  A collection of  similar data elements These data elements have the  same data type  (homogenous) The elements of the array are  stored in  consecutive memory locations and are referenced by an  Index Array index  starts from   zero  (0) Array Declaration & Accessing Array One Dimensional Array Syntax : type name[size]; Example : Delcaration :   int arr[5]; Accessing:  arr[0] = 2; arr[1] = 5; arr[2] = 1; arr[3] = 3; arr[4] = 4; Two Dimensional Array Syntax : type name[size 1][size 2]; Example : Delcaration :   int arr[5][5]; Accessing: arr[0][2] = 1; arr[2][1] = 1; arr[1][2] = 2; arr[2][2] = 9; Multi Dimension Array Syntax : type name[size 1][size 2][size 3][size...]; Example : Declaration :  ...