Posts

Showing posts from March, 2020

RANGKUMAN

RANGKUMAN Link ed List Linked List adalah struktur data linear, pada Linked List terdapat nodes / sekumpulan data yang bersambungan dimana setiap node menunjuk node yang lain dengan pointer. Single Linked List Single Linked List adalah Linked List yang hanya menggunakan satu pointer untuk menghubungkan satu node dengan node lainnya sehingga pada Single Linked List pointer hanya bisa bergerak satu arah saja. Single Linked List diawali dengan head untuk menyimpan alamat awal dan diakhiri dengan node yang pointernya mengarah ke NULL. Double Linked List Double Linked List adalah Linked List yang memiliki dua pointer yaitu head dan tail. Pointer head adalah pointer yang menunjuk ke node pertama dan pointer tail adalah pointer yang menunjuk ke node paling terakhir. Pada Double Linked List juga terdapat next untuk menunjuk ke node selanjutnya dan prev untuk menunjuk ke node sebelumnya sehingga  pointer pada Double Linked List bisa bergerak dua arah. Hash Table Ha...

BINARY SEARCH TREE

Image
BINARY SEARCH TREE SEARCHING Always starts from the root,  compare the data stored with the key we are searching for. I f the data is less than the key value, search in the left subtree otherwise search in the right subtree. a binary search tree can reduce the search time to O(n). Algorithm If root . data is equal to search . data return root else while data not found If data is greater than node . data goto right subtree else goto left subtree If data found return node endwhile return data not found end if INSERTION Start from the root and go down searching for a proper location. If the data is less than the key search for empty location in the left subtree, otherwise searh for empty location in the right subtree. Insert the data if the data that want to be insert is not in the tree (NULL), won't insert duplicates. Algorithm If root is NULL the...

Hash Table and Binary Tree

HASH TABLE Hash Table is a data structure that stores data. It is  consist of 2 parts:  An array format (generally array of Linked List) where we keep the data with special index value.   A hash function that help us to decide wherein the inputted data could be saved. Access of data will be very fast if we know the index of the wanted data.  The efficiency of mapping itself relies upon on how fast the hash function is. Hashing is implemented in 2 steps:  An element is converted into an integer by the usage of a hash function. This element may be used as an index to keep the original, which falls into the hash table. The element is stored in the hash table where it may be fast retrieved by the use of hashed key. Cryptographic Hash Functions A cryptographic hash function is a unique class of hash functions that has numerous properties making it ideal for cryptography. There are certain properties that a cryptographic hash func...

DOUBLY LINK LIST

DOUBLY LINK LIST Doubly Linked List adalah tipe linked list yang memiliki dua poiner sebagai pointer utama. Pointer pertama yaitu pointer head, dimana pointer tersebut menunjuk pada node pertama. Pointer kedua yaitu pointer tail yang menunjuk pada node paling terakhir. Pada Doubly Linked List terdapat next yang menunjuk ke node selanjutnya dan prev yang menunjuk ke node sebelumya yang membuat Doubly Linked List lebih flexible dibandingkan Singly Linked List. https://socs.binus.ac.id/2017/03/15/doubly-linked-list/ https://www.studytonight.com/data-structures/doubly-linked-list

Tugas GSLC Data Structure

LINKED LIST Linked List adalah struktur data linier yang terdiri dari dua bagian, bagian data dan bagian alamat yang menyimpan alamat berikutnya dalam daftar, yang disebut node. Setiap node berisi satu nilai dan satu pointer.  Pointer selalu menunjuk ke anggota berikutnya dari daftar.  Size dari Linked List tidak tetap, dan item data dapat ditambahkan di lokasi mana pun dalam daftar. Linked List menggunakan variabel pointer lokal yang menunjuk ke item pertama dari daftar. Jika pointer itu NULL, maka itu adalah simpul terakhir dalam daftar dan daftar dianggap kosong. LINKED LIST VS ARRAY LINKED LIST : - kumpulan elemen dengan tipe yang sama, yang dihubungkan satu sama lain menggunakan pointer - elemen baru dapat disimpan di mana saja di  dalam memori - tidak perlu menentukan ukuran - s equential access ARRAY : - kumpulan elemen dari tipe data yang serupa - elemen disimpan di lokasi memori yang berdekatan atau secara berurutan di dalam memori ...