Postingan

Menampilkan postingan dari Maret, 2020

Hash Table & Binary Tree (GSLC Data Struct 10 March 2020)

Gambar
Hello, today I'm going to write a summary of Hash Table & Binary Tree. Hash Table Hash Table is a method in data struct which stores data in an associative way. In hash table, data is stored as an array, where every data has its own unique index value. Binary Tree Binary Tree is a tree that has at most 2 children. Because they only have 2 children, people casually called them left and right child. Trees:  Unlike Arrays & Linked Lists, which are linear data structures, trees are hierarchical data structures. Tree Vocabulary:  The topmost node (example : a) is called root of the tree. The elements that are directly under an element are called its children. The element directly above something is called its parent. For example, ‘d’ is a child of ‘b’, and ‘b’ is the parent of ‘d’. Finally, elements with no children are called leaves. tree ---- a <-- root / \ b c / \ \ d e f <-- leaves Wel...