
The classical Josephus' problem is analyzed. Some less known properties are highlighted.
Explore greedy algorithms through classic problems like the activity selection problem and Kadane's algorithm for maximum subarray sums, including interval scheduling and pairing examples.
Explore the knight's path on an n-by-n chessboard, visiting every square exactly once using a backtracking C++ approach with a move matrix and recursive search.
Apply dynamic programming to count non-attacking rooks on an imaginary board using the R[i][j] recurrence, then count non-attacking bishops on a chessboard.
Learn how to count word occurrences in a letter grid using dynamic programming, including prefix-based layering, and compare with Boggle’s backtracking approach that prohibits revisiting squares.
Explore Catalan numbers, definitions and recurrences for counting correctly paired parentheses, and apply them to equivalent problems and a C++ program computing C[n] modulo 1000000007.
Explore dynamic programming techniques to compute probabilities for independent events, sample space definitions, and practical applications such as night moves on a chessboard, tennis match outcomes, and rainy weather.
Learn dynamic programming techniques through games with numbers, greed on parks, and matrix path problems, with DP formulations, examples, and a C++ implementation.
Learn matrix exponentiation and its properties, including the product of two matrices and efficient A^p, using the Q matrix for Fibonacci numbers and adjacency matrices for directed graphs.
Apply the sliding window technique to compute minimum and maximum values in 1D and 2D arrays, solve trapped water problems, and find subarray minima in linear time.
Master advanced dynamic programming techniques for problems with overlapping subproblems, including dynamic programming on states, high-dimensional arrays, dynamic programming on trees and games, with memoization and hashing.
Explore dynamic programming for computational geometry problems, including optimal triangulation of convex polygons and selecting a convex polygon with the maximum number of vertices from a set of points.
This course presents a group of elementary and advanced Algorithms and Programming Techniques. It is the result of my own experience as a trainer in the field of Competitive Programming, teacher, author and (many times) competitor. It is based on the most important theoretical issues and knowledge a student should master. The topics that are discussed stretch from Recursion and its different peculiar applications (Backtracking, Divide and Conquer) to the Branch and Bound method. The course has two different lessons dedicated to the Dynamic Programming Technique, due to the importance this method has.
The course contains many well known problems, presents their solutions in a comprehensible way and offers C++ solutions. A clear purpose and objective that the author had in mind was to have neat statements, proper examples, efficient solutions, easy to understand C++ programs. I suppose that the students already have some elementary background in the C++ language, some experience with STL data structures and implemented methods, CodeBlocks Integrated Development Environment, Online Judges .
Each lesson is followed by some quizzes.
The students are advised to try to implement on their own the C++ programs for the problems they encounter in the lessons.
Every time when it was possible, I used some pictures, animations, free templates offered by different sites.
I hope you will enjoy and appreciate this course.