We often forget the basics of Data structures or algorithm. Let’s not forget them again!!

Data Structure and Algorithms are the basics of our Programming Journey.

We are making Websites or apps or some Complex Machine learning Model, we still need knowledge of Data Structure and Algorithms

This post takes you from the basic Data structure to advance algorithms

1. Array: An array is a collection of items stored at contiguous memory locations.

The idea is to store multiple items of the same type together. This makes it easier to calculate the position of each element by simply adding an offset to a base value

2. Linked List: A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations.

The elements in a linked list are linked using pointers as shown in the below image:

3. Stack: Stack is a linear data structure that follows a particular order in which the operations are performed.

The order may be LIFO(Last In First Out) or FILO(First In Last Out).

4. Queue: A Queue is a linear structure that follows a particular order in which the operations are performed.

The order is First In First Out (FIFO).

5. Tree: A tree is a hierarchical data structure defined as a collection of nodes. Nodes represent value and nodes are connected by edges.

The tree has one node called root. The tree originates from this, and hence it does not have any parent.

6. Heap: A heap is a special Tree-based data structure in which the tree is a complete binary tree.

Generally, Heaps can be of two types: Max-Heap and Min-Heap

7. Priority Queue: A priority queue is an abstract data type that behaves similarly to the normal queue except that each element has some priority, i.e., the element with the highest priority would come first in a priority queue.

Removing Highest Priority Element👇

8. Huffman Tree: Huffman coding provides codes to characters such that the length of the code depends on the relative frequency or weight of the corresponding character.

Huffman codes are of variable length, and without any prefix (that means no code is a prefix of any other).

9. Union Find: Union–find is a data structure that stores a collection of disjoint sets.

Equivalently, it stores a partition of a set into disjoint subsets. It provides operations for adding new sets, merging sets and finding a representative member of a set.

10. Trie: Trie is an efficient information retrieval data structure. Using Trie, search complexities can be brought to optimal limit (key length).

By Ramesh Fernandez 564 Views

Leave a Reply