Today, we learnt about different data structures, and their applications in Computer Science. It was interesting to see how they served very specific purposes at times, and examples like the “undo” (Ctrl+Z) command using the Stack Data Structure made things simpler to understand.
We first learnt about the Array data structure, also known as a one dimensional array. They can be used in various algorithms to decrease run time, and increase efficiency.
The next data structure we went over was queue. It follows the process of first in, first out (FIFO). It is an example of a linear data structure.
In the Stack data structure, the last element added to the structure must be the first one to be removed, and hence it works on the principle of Last in, First out (LIFO).
Binary Trees are used for efficient searching and sorting. It consists of The root node, parents, children. One parent node can have a maximum of two children.