Posts

Showing posts from March, 2020

Final Summary

Linked list is a process or a way that enables us to easily edit an array  without using looping (e.g for) to count from zero to the point where we want to edit the data (also shifting is needed when editing an array).  So far, we have learned about two types of linked list. Doubly and single linked list, the first one is the circular single linked list. In circular single linked list, the last node contains a pointer to the first node which can help determine whether the data is located in the middle or in the end and also there is no storing of NULL value in the list. Secondly there is double linked list, which is a two way linked list that points to the nest data while also pointing to the previous data. Thirdly there is circular doubly linked list which is very similar to the single linked list but differ on the amount of pointer in each node (2). Just as I stated above, linked list gives us the ability to edit an array far more efficient rather than using a looping process. Th

Binary Search Tree

Image
Binary Search Tree Binary Search Tree is one the data structures that features fast searching, sorting, easy insertion and deletion. Its also a sorted version of the binary tree. The tree works by appointing one node and the data following the node is separated by their amount. If the data is bigger than the node then the data goes to the right subtree and on the other hand, the smaller data goes to the left sub tree. The system works recursively so the sub-subbranch of the BST also sorts the data, which makes it easier to search. Operations In BST there is 3 operations which is find(x), insert(x), remove(x). Find = finding the key (x) in the BST Insert = inserting a new key (x) into the BST Remove = removing key (x) from BST ·        Find Because the BST sorts the data adequately, finding a key (x) is very easy. When we commence a search, we will begin at the root and the program will compare the key to the root. If the data is bigger than it will continue to t

Hashing Table and Binary Tree

Hashing Hashing is a technique used for storing and retrieving keys in a rapid manner. The string of characters is made shorter in length value but still represents its original string. Hash Table Hash table is a table of array where a string is stored and can be hashed. Its size is usually smaller that the total number of possible string, so several string might have a same hashed-key. Hash Function There are a lot of ways to hash a string into a key, the most common is Division. Division Division is one of the methods used to hash a string into a key, which is done by dividing the string/identifier by using the modulus operator and the value that is usually used is a prime number, the table size or the size of memory used. “HIKE” would be stored at the location                         ( 64+8 + 64+9 + 64+11 + 64+5) % 97 = 2 Binary Tree Binary tree is rooted tree data structure in which each node has at most two children and the two children u

Stack and Infix, Prefix, Postfix Notation

Stack is one of the basic flow of data that can come from an array list or a linked list. Imagine if there was a stack of boxes or plate. The last box or plate will be the first one to be used (LiFo: Last in First out). Just like that analogy, the "Stack" concept have only one place where the data can enter and exit which is the top. We also learned about Infix, Prefix and Postfix which is the shifting of the operators in a certain expression notation and the answer to the question at the meeting was pref : / + 1 3 ^ * 100 5 30 post: 1 3 + 100 5 * 30 ^ /

Linked List II Summary

Linked list is a process or a way that enables us to easily edit an array  without using looping (e.g for) to count from zero to the point where we want to edit the data (also shifting is needed when editing an array).  So far, we have learned about two types of linked list. Doubly and single linked list, the first one is the circular single linked list. In circular single linked list, the last node contains a pointer to the first node which can help determine whether the data is located in the middle or in the end and also there is no storing of NULL value in the list. Secondly there is double linked list, which is a two way linked list that points to the nest data while also pointing to the previous data. Thirdly there is circular doubly linked list which is very similar to the single linked list but differ on the amount of pointer in each node (2). Just as I stated above, linked list gives us the ability to edit an array far more efficient rather than using a looping process. The r