Posts

Final Rangkuman

Image
Name: Anthony Christoper NIM: 2301911590 Class: CB01 DOSEN: Ferdinand Ariandy Luwinda (D45222) & Hentry Chong(D4460) Data Structure : Doubly Linked List  Doubly linked list is a collection of nodes linked together in a sequential way. Each node of the list contains two parts data part and reference/address part. The basic structure of node is shown in the below image: Doubly linked list is almost similar to singly linked list except it contains two address or reference fields, where one of the address field contains reference of the next node and other contains reference of the previous node. First and last node of linked list contains a terminator generally a NULL value, that determines the start and end of the list. Doubly linked list is sometimes also referred as bi-directional list since it allows traversal of nodes in both direction. The basic structure of a doubly linked list is represented as: Since doubly linked list allows the traversal of nodes in...

AVL TREE

Image
AVL TREE is pretty similar to binary search tree but AVL can adjust the balance of the tree automatically The root of the node AVL tree is 0 The leaf of the right or leaf of the left is 1. if the leaf is more than 1 the tree will automatically adjust the balance The above picture is from the right node input and will be rotating to the left. and this other picture is node from the left side and the rotation will be going to the right. the correct solution of the wrong AVL tree is below:- here another example :- Example of Single rotation below example of Doubly rotation Source: https://www.tutorialspoint.com/data_structures_algorithms/avl_tree_algorithm.htm https://en.wikipedia.org/wiki/File:AVL_Tree_Example.gif AVL TREE PPT binus https://www.cs.usfca.edu/~galles/visualization/AVLtree.html

Binary Search Tree(BNS)

Image
BNS is also known as versions of sorted version of binary tree for the node of the left subtree is contain smaller number than those store in x for the node of the right subtree is contain greater number than those store in x there are three operation in BNS: insert() search() remove() The insert of BNS is to store is done recursively. let the new node's key be X, then we have a number of 30 of the beginning of the first node. if the node key input is smaller it will move the node to the left subtree side, if the node key is greater than it will move to the right subtree side. here is the example:- Now we will discuss search of BNS or can be call find of BNS. The search is pretty easy it just finds the node key of the X in the tree. if the search found the node it search then it will print the "the node key is found in the tree". The search algorithm is pretty much similar to insert but it job not to insert but to find only. La...

Summary of Hashing in Data Structure

Image
What is Hashing? Hashing is the process of mapping large amount of data item to smaller table with the help of hashing function. Hashing is also known as  Hashing Algorithm  or  Message Digest Function . It is a technique to convert a range of key values into a range of indexes of an array. It is used to facilitate the next level searching method when compared with the linear or binary search. Hashing allows to update and retrieve any data entry in a constant time O(1). Constant time O(1) means the operation does not depend on the size of the data. Hashing is used with a database to enable items to be retrieved more quickly. It is used in the encryption and decryption of digital signatures. What is Hash Function? A fixed process converts a key to a hash key is known as a  Hash Function. This function takes a key and maps it to a value of a certain length which is called a  Hash value  or  Hash. Hash value represents the original string...

Pengertian kelas besar tentang head, curr, tail

Image
  The topic I learn today in Big class is about the concept position of where will our pointer be directed at when we have head, curr, and tail.   Let say we have a singly link list that we want to make a push insertion.To make it happen we need to know where our address is first before we start making push insertion. The push insertion will be pushing from the front(beginning) and make a pop will be delete address. struct node{   int data; // value   struct node *next, *prev; // address }*head,*curr,*tail; void push(int a) {     curr = (struct Data*)malloc(sizeof(struct Data));//create address     curr->value = a;//insert value input a         if(head==NULL){// if head don have any address then we create one         head = tail = curr;     }     else{         tail->next = curr;// move tail to curr         curr->...

Today Topic

Image
Data Structure : Doubly Linked List  Doubly linked list is a collection of nodes linked together in a sequential way. Each node of the list contains two parts data part and reference/address part. The basic structure of node is shown in the below image: Doubly linked list is almost similar to singly linked list except it contains two address or reference fields, where one of the address field contains reference of the next node and other contains reference of the previous node. First and last node of linked list contains a terminator generally a NULL value, that determines the start and end of the list. Doubly linked list is sometimes also referred as bi-directional list since it allows traversal of nodes in both direction. The basic structure of a doubly linked list is represented as: Since doubly linked list allows the traversal of nodes in both direction hence we can keep track of both first and last nodes. The implementation   of doubly linked list in C...