Even though it’s basically the same as lifo. Even so, stacks still have something in common with queues. Because both of them are linear. Here is an example of an illustrative stack. As you can see, the data that arrives first is the data that waits the longest to be process: stack data structure source: geeksforgeeks.com 5. Binary trees binary tree is a data structure arrang in a hierarchical form. So, each data point will experience branching. And each point has a maximum of only two branches. The relationship between data points and their two branches is connect with pointers. The illustration goes like this: binary tree data structure source: geeksforgeeks.com 6. Binary search tree binary search tree is one type of binary tree. The shape is more or less the same. The difference is, the binary search tree determines the value of each data branch . Let’s take an example, suppose main data has branches on left and right side . So, the data on the left branch must have a smaller value than the main data. Conversely, data on the right branch must have a greater value than the main data.
What is Data Structure?
This rule also applies to the branches below it. So, the lower the branch on the left the value will decrease, while the branch on the right the further down the value will increase. Illustration of binary search tree source: geeksforgeeks.com 7. Heap the heap is a data structure that looks the same as a binary tree. The difference lies in the data value rules. So, there are two types of heap structures, namely max heap and min heap . Max heap is a data structure where the main data value must be higher than its branches. On the other hand, min heap is placing the lowest value on the main data. So, the further Czechia B2B List down, the value of the branch data will be higher. Here is an illustration of the difference between max heap and min heap: heaps data structure source: geeksforgeeks.com 8. Graphs graph is a data structure that is non-linear. So, each data can be connect freely.
In linked lists, data is usually called nodes , whereas in graphs it is usually called vertices . Whereas pointers in linked lists are usually called edges in graphs. The following is a description of the non-linear relationship in the graph: graphic illustration source: geeksforgeeks.com also read: 11+ types of programming languages: all the info you need to know ready to use data structures? Okay, now you know the various types of data structures that are commonly used in computer Mobile Lead programming. Starting from linear ones such as arrays and linked lists, to non-linear ones such as graphs. Even if you already understand the basics, it’s still a good idea to apply each structure directly to deepen your understanding. So, if you are interested in learning more about data and web.