Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Deep Dive into Algorithms
Rating: 4.3 out of 5(46 ratings)
729 students

Deep Dive into Algorithms

Deep Dive into Algorithms
Last updated 9/2020
English

What you'll learn

  • Students will learn various Backtracking Problems along with implementation using C language
  • Students will learn various Dynamic Programming Problems along with implementation using C language
  • Students will learn various Graph Algorithms along with implementation using C language
  • Branch and Bound
  • Divide and Conquer
  • Greedy Algorithm
  • Pattern Matching
  • Searching and Sorting

Course content

4 sections82 lectures32h 22m total length
  • Introduction35:23

    Explore backtracking and its cousins from recursion and recurrence relations to dynamic programming, with emphasis on state-space trees, bounding functions, branch-and-bound, and problem types like decision, optimization, and enumeration.

  • Concept of N Queen Problem1:03:08

    Explore the n queen problem: place n queens on an n by n board so none attack each other, using queen moves and backtracking to enumerate all solutions.

  • Implementation of N Queen Problem38:14

    Explore the N queen problem with backtracking and recursion, using a solution array, an isSafe check, and a state-space tree to place queens and display all solutions.

  • Time Complexity Analysis of N Queen Problem5:34

    Analyze the time complexity of the N-queen problem using a successive substitution approach, tracing how N minus one and minus two substitutions expand the search space.

  • Concept of Knight's Tour Problem25:48

    Explore the knight's tour on an 8x8 chessboard using backtracking to visit all 64 cells exactly once, leveraging eight possible moves and state tracking.

  • Implementation of Knight's Tour Problem41:23

    Explore the knight's tour problem on a chessboard and implement a backtracking solution using eight knight moves, state space exploration, initialization, and a visited check to complete the tour.

  • Time Complexity Analysis of Knight's Tour Problem8:44

    Analyze the knight's tour time complexity using a backtracking tree with eight possible moves per step, revealing an exponential growth and a base-case stop when no moves remain.

  • Concept Explanation of Rat in a Maze Problem23:36

    Demonstrate backtracking on a rat in a maze: a 4x4 matrix from (0,0) to (n-1,m-1), moving only right or down, exploring decision, optimization, and enumeration paths.

  • Implementation of Rat in a Maze35:49

    Apply backtracking to find all paths for a rat in a maze from (0,0) to (n-1,m-1), moving only right or down, using a matrix and a recursive solver.

  • Time Complexity Analysis of Rat in a Maze4:55

    Analyze the time complexity of the rat in a maze by noting two movement possibilities at each step, producing exponential growth in possibilities, roughly O(2^n).

  • Concept Explanation of Subset Sum34:25

    Explore the subset sum problem with backtracking, and compare it to dynamic programming for efficiency. Learn how non-contiguous subsets and pruning yield exact sums.

  • Implementation of Subset Sum Problem28:34

    Explore backtracking techniques to solve the subset sum problem through a recursive solution, using balance, actual sum, and input arrays to build and display valid subsets.

  • Time and Space Complexity Analysis of Subset Sum Problem13:24

    Analyze the time and space complexity of the subset sum problem through recurrence relations, substitution, and backtracking, highlighting exponential growth and efficiency trade-offs.

  • Concept Explanation of M-Coloring Problem43:04

    Explore the m-coloring problem using backtracking to color a graph with given colors while enforcing that adjacent vertices have different colors; compare decision, optimization, and enumeration approaches.

  • Implementation of M Coloring Problem36:39

    Explore the backtracking approach to the m coloring problem, constructing a graph via an adjacency matrix, receiving vertices and colors from the user, and coloring vertices while enforcing color constraints.

  • Time and Space Complexity Analysis of M Coloring Problem13:37

    Analyze the time and space complexity of the m-coloring problem by deriving and solving a recurrence relation using state history and backtracking across three color options per vertex.

  • Concept Explanation of Hamiltonian Cycle Problem34:16

    Explores the Hamiltonian cycle problem on graphs, teaching how to visit every vertex exactly once and return to the start using backtracking and the role of articulation points.

  • Implementation of Hamiltonian Cycle37:57

    Explore implementing a Hamiltonian cycle via backtracking in C, building a graph with an adjacency matrix, and using a solve function and a display function to show all solutions.

  • Time and Space Complexity Analysis of Hamiltonian Cycle9:58

    Analyze the time and space complexity of Hamiltonian cycle implementations using backtracking, deriving per-vertex possibilities and enumeration-based insights.

  • Concept Explanation of Sudoku Solver48:54

    Explore the concept of solving sudoku via backtracking on a 9x9 grid, enforcing row, column, and 3x3 subgrid constraints with digits 1–9.

  • Implementation of Sudoku Solver37:55

    Explore implementing a 9x9 sudoku solver using backtracking and recursion, with input handling, a validity check for rows, columns, and 3x3 subgrids, and solution display.

  • Time and Space Complexity Analysis of Sudoku Solver24:05

    Explain the time and space complexity of a sudoku solver using backtracking, showing nine possibilities per empty cell and a time complexity of nine to the n, with constant space.

  • Sieve of Eratosthene18:56

    Explore the Sieve of Eratosthenes to find all primes up to a given number by selecting a base and eliminating its multiples, stopping at the square root.

  • Implementation of Sieve of Eratosthene19:02

    Implement the sieve of Eratosthenes to generate primes by marking multiples up to the square root of n, starting at the square of each prime, and printing primes below n.

  • Concept Explanation of Sieve of Sundaram24:13

    Explore the sieve of Sundaram. It removes numbers of the form i + j + 2ij from 1 to (n-1)/2 and maps the remainder to primes.

  • Implementation of Sieve of Sundaram21:46

    Learn the implementation of the sieve of Sundaram to generate primes. Follow elimination steps, index-value mapping, and final prime construction.

  • Time and Space Complexity Analysis of Sieve of Eratosthene and Sieve of Sundaram27:08

    Compare the time and space complexity of the Sieve of Eratosthenes and the Sieve of Sundaram, showing Eratosthenes optimizes time, while Sundaram saves space for prime generation.

  • Sieve of Eratosthene in O(N) Time Complexity31:01

    This lecture introduces a modified sieve using the smallest prime factor to mark composites in linear time, enabling primes up to a given limit.

  • Implementation of Sieve of Eratosthene in O(N) Time Complexity33:36

    Explore a modified sieve of Eratosthenes that achieves O(N) time by using a dynamic prime list and smallest prime factor SPF arrays to generate and store primes.

  • Prime Numbers after P with Sum S32:49

    Use backtracking to find three prime numbers between two and S that sum to S, while generating prime numbers with the sieve of Eratosthenes and analyzing complexity.

  • Implementation of Prime Numbers after P with Sum S42:02

    Learn to implement a backtracking method that generates primes after a given prime and selects a subset whose sum matches the target, using linked lists, traversal, and recursive safety checks.

  • Time and Space Complexity Analysis of Prime Numbers after P with Sum S20:46

    Analyze the time and space complexity of a prime-selection algorithm using recursion and loops. Derive a recurrence, solve by substitution, and discuss activation records and space bounds.

Requirements

  • Recursion

Description

An algorithmic paradigm or algorithm design paradigm is a generic model or framework which underlies the design of a class of algorithms. An algorithmic paradigm is an abstraction higher than the notion of an algorithm, just as an algorithm is an abstraction higher than a computer program.

  • How does one calculate the running time of an algorithm?

  • How can we compare two different algorithms?

  • How do we know if an algorithm is `optimal'?

Who this course is for:

  • Programmers who are interested to learn algorithms