Hash Table
Due to class being a bilingual-language class, I'm going to use English for this point onward. Some may be in Indonesian but mostly it will be in English.
Hash table is one of the several types of Data structures that stores its value in array manner. Usually we use Hash table to store string values. In Hash table, there's a method which called Hashing. In Hash table, we will use the spesific "key" to acquire it's information, so in this type of data structure, you will need a "key". This key can be something like names,code,etc. Every array can be set into certain "key". that array can contain something like attribute and such. For example, if you set your key into names, like "Dave" and you calculate the total amount of their ascii number then modulo it to the amount of array, that way we can tell which array do "Dave" attribute stored at. This way we can search faster than that of the normal linear search for array.
There are 3 basic operations for Hash table: Search, Insert, Delete.
Search
There are several methods on how you do the searching in Hash table, but for the sake of simplicity I will use the division method. What this does is as you can read above in the example, you can convert each character of the string into their ascii numbers. Then you can modulo it to the amount of array or array size. If you formulized it. it can be something like (Ascii) Mod (ArrSize). If you don't know how this can be implemented in C language, then I will show you how :
Insert
Insertion can be as simple as the picture above. As you can see in the last part, you can just use that to put some value into the array that you already have using the previous method. For example: in the last line of the code, we can insert the value into the array that the key has been modulo by the amount of array.
Deletion
Deletion is as the same as insertion, only here you can clear the value inside the array that you want to delete.
Linear Probing
This is one of the solution if you ever have the "Collution" problem. Collution problem is a problem when you already have a value inside a certain array that you want to insert. This will cause a collution between values. This can be avoided using the Linear Probing method. How this works is whenever you find collution, you can always place the same "key" into the next array. This may cause some problem if you have a limited amount of array but a large number of key and its attribute you want to add.
Chaining
This solution is a bit better than Linear Probing. Instead of adding it into the next array, you can make those array into some Linked List where you can store undinifed amount of value that has the same key in the same array.
Binary Tree
Binary tree is the type of data structure that divide the node into some binary node tree. The way it works is you have a root as your base to expand later. then if you want to add another node, you can add it on the left or the right depends on how the value react to the root. If the value is lower than the root, that usually it goes to the left. But if the value is larger than the root, they goes to the right. THE most important part of this tree is that you cannot have more than TWO CHILDS for each node.
The first node or "1" node, is the root of the tree. And the last level of nodes (Such as 8,9,10,11,13,14) is the leaf of the tree.
Types of Binary Tree
There are several types of Binary Tree, some of which are :
Perfect Binary Tree
Complete Binary Tree
Skewed Binary Tree
References :
Binusmaya resource powerpoint
Pictures are from geektogeeks