Algorithms Tutorial
Improve
Learn Data Structures and Algorithms | DSA Tutorial
Learn more about Algorithms in DSA Self Paced Course
Practice Problems on all Algorithms
What is an Algorithm?
The word Algorithm means “A set of rules to be followed in calculations or other problem-solving operations” Or “A procedure for solving a mathematical problem in a finite number of steps that frequently involves recursive operations “.
Therefore Algorithm refers to a sequence of finite steps to solve a particular problem.
Algorithms can be simple and complex depending on what you want to achieve.

Table of Content
- What is an Algorithm?
- Introduction to Algorithms
- Analysis of Algorithms
- Searching and Sorting
- Greedy Algorithms
- Dynamic Programming
- Pattern Searching
- Backtracking
- Divide and Conquer
- Geometric Algorithm
- Mathematical Algorithms
- Bitwise Algorithms
- Graph Algorithms
- Randomized Algorithms
- Branch and Bound
- Quizzes
Introduction to Algorithms:
- What is Algorithm | Introduction to Algorithms
- Definition, Types, Complexity, Examples of Algorithms
- Algorithms Design Techniques
- Why is analysis of an Algorithm important?
Analysis of Algorithms:
- Asymptotic Analysis
- Worst, Average and Best Cases
- Asymptotic Notations
- Lower and Upper Bound Theory
- Introduction to Amortized Analysis
- What does ‘Space Complexity’ mean?
- Polynomial Time Approximation Scheme
- Accounting Method | Amortized Analysis
- Potential Method in Amortized Analysis
Searching and Sorting:
- Introduction to Searching Algorithms
- Introduction to Sorting Algorithm
- Stable and Unstable Sorting Algorithms
- Lower bound for comparison based sorting algorithms
- Can Run Time Complexity of a comparison-based sorting algorithm be less than N logN?
- Which sorting algorithm makes minimum number of memory writes?
Greedy Algorithms:
- Introduction to Greedy Algorithms
- Activity Selection Problem
- Huffman Coding
- Job Sequencing Problem
- Quiz on Greedy Algorithms
- Minimum Number of Platforms Required for a Railway/Bus Station
Dynamic Programming:
- Introduction to Dynamic Programming
- Overlapping Subproblems Property
- Optimal Substructure Property
- Longest Increasing Subsequence
- Longest Common Subsequence
- Min Cost Path
- Coin Change
- Matrix Chain Multiplication
- 0-1 Knapsack Problem
- Longest Palindromic Subsequence
- Palindrome Partitioning
Pattern Searching:
- Introduction to Pattern Searching
- Naive Pattern Searching
- KMP Algorithm
- Rabin-Karp Algorithm
- Pattern Searching using a Trie of all Suffixes
- Aho-Corasick Algorithm for Pattern Searching
- Z algorithm (Linear time pattern searching Algorithm)
Backtracking:
- Introduction to Backtracking
- Print all permutations of a given string
- The Knight’s tour problem
- Rat in a Maze
- N Queen Problem
- Subset Sum
- m Coloring Problem
- Hamiltonian Cycle
- Sudoku
Divide and Conquer:
- Introduction to Divide and Conquer
- Merge Sort
- Write your own pow(x, n) to calculate x*n
- Count Inversions
- Closest Pair of Points
- Strassen’s Matrix Multiplication
Geometric Algorithm:
- Introduction to Geometric Algorithms
- Closest Pair of Points | O(nlogn) Implementation
- How to check if a given point lies inside or outside a polygon?
- How to check if two given line segments intersect?
- Given n line segments, find if any two segments intersect
- How to check if given four points form a square
- Convex Hull using Jarvis’ Algorithm or Wrapping
Mathematical Algorithms:
- Introduction to Mathematical Algorithms
- Write an Efficient Method to Check if a Number is Multiple of 3
- Write a program to add two numbers in base 14
- Program for Fibonacci numbers
- Average of a stream of numbers
- Multiply two integers without using multiplication, division and bitwise operators, and no loops
- Babylonian method for square root
- Sieve of Eratosthenes
- Pascal’s Triangle
- Given a number, find the next smallest palindrome
- Program to add two polynomials
- Multiply two polynomials
- Count trailing zeroes in factorial of a number
Bitwise Algorithms:
- Introduction to Bitwise Algorithms
- Little and Big Endian
- Detect opposite signs
- Swap bits
- Turn off the rightmost set bit
- Rotate bits
- Next higher number with same number of set bits
- Swap two nibbles in a byte
Graph Algorithms:
- Introduction to Graph Algorithms
- BFS, DFS
- Cycles in Graph
- Shortest paths
- MST
- Topological Sorting
- Connectivity
- Max Flow
Randomized Algorithms:
- Introduction to Randomized Algorithms
- Linearity of Expectation
- Expected Number of Trials until Success
- Randomized Algorithms | Set 0 (Mathematical Background)
- Randomized Algorithms | Set 1 (Introduction and Analysis)
- Randomized Algorithms | Set 2 (Classification and Applications)
- Randomized Algorithms | Set 3 (1/2 Approximate Median)
- Reservoir Sampling
Branch and Bound:
- Branch and Bound | Set 1 (Introduction with 0/1 Knapsack)
- Branch and Bound | Set 2 (Implementation of 0/1 Knapsack)
- Branch and Bound | Set 3 (8 puzzle Problem)
- Branch And Bound | Set 4 (Job Assignment Problem)
- Branch and Bound | Set 5 (N Queen Problem)
- Branch And Bound | Set 6 (Traveling Salesman Problem)
Quizzes:
- Analysis of Algorithms
- Sorting
- Divide and Conquer
- Greedy Algorithms
- Dynamic Programming
- Backtracking
- NP Complete
- Searching
- Recursion
- Bit Algorithms
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!
Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Share your thoughts in the comments

