Postingan

Menampilkan postingan dari 2020

FINAL REVIEW Data Structures Binus

Gambar
FINAL REVIEW Data Structures Nama   : Albertius Christopher Nathan NIM     : 2301883643 Kelas    : CB-01 / LN-01 Dosen   : Gradiyanto Sanjaya (D5327), NICKY HENDRIK SEN (NH191), WAHYU (WU191) [LN-01]               Henry Chong (D4460),  Ferdinand Ariandy Luwinda ( D4522) [CB-01] 1. Linked List sa Linked List is pretty similar to array, but Linked List is a linear data structure. Unlike arrays, linked list elements are not stored at a contiguous location; the elements are linked using pointers. Linked List are divided into 2 types, the Single Linked List and Double Linked List. To read more about linked lists, you can go here  2. Hashing, Hash Tables, and Binary Tree Hashing is an important Data Structure which is designed to use a special function called the Hash function which is used to map a given value with a particular key for faster access of elements. The efficiency of mapping depends of the efficiency of the hash function used. Hash Table is a data s

Heap and Tries

Gambar
What is HEAP? A heap is a tree-based data structure in which all the nodes of the tree are in a specific order. For example, if  X  is the parent node of  Y , then the value of  X  follows a specific order with respect to the value of  Y  and the same order will be followed across the tree. The maximum number of children of a node in a heap depends on the type of heap. However, in the more commonly-used heap type, there are at most  2  children of a node and it's known as a binary heap. In a binary heap, if the heap is a complete binary tree with  N  nodes, then it has the smallest possible height which is  l o g 2 N . Illustration of Heap In the diagram above, you can observe a particular sequence, i.e each node has greater value than any of its children. Suppose there are  N  Jobs in a queue to be done, and each job has its own priority. The job with maximum priority will get completed first than others. At each instant, we are completing a job with maxi