Algorithm Tutorials

Algorithm tutorials are present all over the internet. However, searching for the easy understandable ones waste a lot of time. So i will try to post links to as many techniques as possible here. My aim, however, is to write tutorials for all the topics myself in this blog.

1) Brute Force Techniques/Adhoc Problems
  • Basic
Backtracking
Generating all possible subsets using bitmasks
  • Intermediate
2) Sorting Techniques
  • Basic
Selection Sort, Bubble Sort, Insertion Sort
Merge sort
Quick sort
Sorting using STL - sort()

3) Searching Techniques
  • Basic
Binary Search on a list
  • Intermediate
Discrete binary search (on a range of numbers)
Ternary Search

4) Data Structures
  • Basic
Stack
Queue
Priority Queue
  • Intermediate
Union Find / Disjoint Set Data Structure
Hash Tables
BIT
Segment Tree
Trie

5) Dynamic Programming
  • Basic
LCS
LIS
Edit Distance
Matrix Chain Multiplication
0/1 Knapsack
Coin Change
Rod Cutting
Box Stacking
  • Intermediate
Matrix Exponentiation
Bitmasking

6) Graphs
  • Basic
Depth First Search
Breadth First Search
Floyd-Warshall's Algorithm for All Pairs Shortest Paths
Topological Sort
Dijkstra's Algorithm for Single Source Shortest Path (only positive edge weights)
  • Intermediate
Minimum Spanning Tree - Prim's, Kruskals
Strongly Connected Components
Articulation Points/Bridges
Bellman Ford's Algorithm for Single Source Shortest Path with negative edge weights
  • Advanced
Maximum Flow - using Ford-Fulkerson, Dinic's, Push-Relabel

7) Mathematics
  • Basic
GCD - Euclid's Algorithm
Modular Exponentiation
Sieve Of Eratosthenes - Primality testing for numbers in a range
  • Intermediate
Extended GCD
Miller Rabin - Primality Testing for a single number

8) Strings
  • Intermediate

9) Computational Geometry
  • Basic
  • Intermediate 

10) NP Complete Problems
Traveling Salesman Problem - Dynamic Programming

No comments:

Post a Comment