Home
Algorithms Tutorial
Last updated : August 12, 2023
Algorithms Tutorial: This page contains detailed tutorials on the top algorithms on sorting, searching, dynamic programming, graphs, backtracking, operating system, etc. with their examples and implementations.
Glossary
Basics
- What is an Algorithm | Introduction to Algorithms
- Algorithm and Its Types
- Algorithm and Its Properties
- Time Space Trade-Off of algorithms
- Time Complexity and Space Complexity Analysis of Algorithm
Sorting Algorithms
- Introduction to Greedy Strategy Algorithm
- What is stability in sorting?
- External Merge Sorting Algorithm
- Radix Sort Algorithm
- Bucket Sort Algorithm
- Bubble Sort Algorithm
- Insertion Sort Algorithm
- Merge Sort Algorithm
Searching Algorithms
- Binary Search: Algorithm, Example & C, C++ Implementations
- Randomized Binary Search: Algorithm, Time Complexity, Implementations
- Meta Binary Search | One-sided Binary Search
- Linear Vs. Binary Search: Comparisons & Key Differences
- Binary Search in String (Example & C++ Implementation)
- Variants of Binary Search
- Find Prime Numbers using Sieve of Eratosthenes Algorithm
- Optimal Merge Pattern (Algorithm and Example)
- Check duplicate elements in an array of n elements
- Find the missing number (With Example and C Program)
- Find the number occurring an odd number of times
- Find the pair whose sum is closest to zero in minimum time complexity
- Find three elements in an array such that their sum is equal to given element K
- Bitonic Search Algorithm
- Check whether a number is Fibonacci or not
- Segregate even and odd numbers in minimum time complexity
- Find trailing zeros in factorial of a number
- Find Nearest Greatest Neighbours of each element in an array
- Interpolation search algorithm
- Floor and ceil of an element in an array using C++
- Two Elements whose sum is closest to zero
- Find a pair with a given difference
- Count number of occurrences (or frequency) in a sorted array
- Find a Fixed Point (Value equal to index) in a given array
- Find the maximum element in an array which is first increasing and then decreasing
Dynamic Programming
- Dynamic Programming (Components, Applications and Elements)
- Algorithm for fractional knapsack problem
- Algorithm and procedure to solve a longest common subsequence problem
- Dynamic Programming (Components, Applications and Elements)
- Find the Nth Fibonacci number | C++
- Longest Common Subsequence using Dynamic programming (DP)
- Longest Increasing Subsequence using Dynamic programming (DP)
- Find the maximum sub-array sum using KADANE'S ALGORITHM
- Non-intersecting chords using Dynamic Programming (DP)
- Edit Distance using Dynamic Programming (DP)
- Finding Ugly Number using Dynamic Programming (DP)
- Egg dropping problem using Dynamic Programming (DP)
- Wild card matching problem using Dynamic programming (DP)
- Compute sum of digits in all numbers from 1 to N for a given N
- Minimum jumps required using Dynamic programming (DP)
Graph Algorithms
- Graph coloring problem's solution using backtracking algorithm
- Breadth First Search (BFS) and Depth First Search (DFS) Algorithms
- Travelling Salesman Problem
- Kruskal's (P) and Prim's (K) Algorithms
- Multistage graph problem with forward approach and backward approach algorithms
- Floyd Warshall algorithm with its Pseudo Code
Backtracking Algorithms
- Backtracking (Types and Algorithms)
- 4 Queen's problem and solution using backtracking algorithm
- N Queen's problem and solution using backtracking algorithm
Recursion
- Types of Recursion
- Find the GCD (Greatest Common Divisor) of two numbers using EUCLID'S ALGORITHM
- Compute the value of A raise to the power B using Fast Exponentiation
Operating System Algorithms
- Implementations of FCFS scheduling algorithm using C++
- Implementation of Shortest Job First (SJF) Non-Preemptive CPU scheduling algorithm using C++
- Implementation of Shortest Job First (SJF) Preemptive CPU scheduling algorithm using C++
- Implementation of Priority scheduling (Pre-emptive) algorithm using C++
- Implementation of Priority scheduling (Non Pre-emptive) algorithm using C++
- Implementation of Round Robin CPU Scheduling algorithm using C++
- Analysis of LRU page replacement algorithm and Belady's anomaly
Algorithms Implementation
- Implement First Come First Served (FCFS) CPU Scheduling Algorithm using C program
Miscellaneous Topics