Sorting Algorithms
A Sorting Algorithm is used to rearrange a given array or list elements according to a comparison operator on the elements. The comparison operator is used to decide the new order of elements in the respective data structure.
- Bubble sort
- Insertion sort
- Quick sort
- Merge sort
- Heap sort
- Counting sort
Searching algorithms
Searching Algorithms are designed to check for an element or retrieve an element from any data structure where it is stored.
- Linear search
- Binary search (with all its variants)
- Breadth-first search (BFS)
- Depth-first search (DFS)
Array algorithms
Array is a container that can hold a fixed number of items and these items should be of the same type. Most of the data structures make use of arrays to implement their algorithms. Following are the important terms to understand the concept of Array.
Element − Each item stored in an array is called an element.
Index − Each location of an element in an array has a numerical index, which is used to identify the element.
- Kadane's algorithm
- Floyd cycle detection algorithm
- KMP algorithm
- Quick select algorithm
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).
- Tower of Hanoi problem
- Infix to postfix conversion
- Parenthesis matching
Tree and Heap algorithms
A Heap is a special Tree-based data structure in which the tree is a complete binary tree.
- Creation of heap
- Implementation of Priority queue
- Traversals - preorder, inorder, postorder
Graph algorithms
A Graph is a non-linear data structure consisting of nodes and edges. The nodes are sometimes also referred to as vertices and the edges are lines or arcs that connect any two nodes in the graph. More formally a Graph can be defined as,
A Graph consists of a finite set of vertices(or nodes) and a set of Edges that connect a pair of nodes.
- Kruskal's algorithm
- Prim's algorithm
- Dijkstra's algorithm
- Bellman ford algorithm
- Topological sort algorithm
Dynamic programming (Recursion+Memoization)
Memoization is a way to potentially make functions that use recursion run faster. . A memoization function allows us to store input alongside the result of the calculation. Therefore, rather than having to do the same work again using the same input, it can simply return the value stored in the cache.
- Fibonacci series
- Longest common subsequence
- Matrix chain multiplication
Other
- Huffman coding for compression
- Bit vector
- Disjoint set data structure (Union find)
If you liked this, make sure to: like and follow