Skip to content

nagajas/Ingenuity-2D-DP

Repository files navigation

Ingenuity-2D-DP

This repository contains code files and resources related to 2D Dynamic Programming workshop conducted by Ingenuity at IIT Bhilai.

Problems Discussed

  1. Starting from the top-left corner of an m x n grid, how many unique paths are there to the bottom-right corner if you can only move either down or right at any point in time?

    Solutions:

    1. C++
    2. Python
  2. Same as the previous problem, but now there are obstacles in the grid. You cannot move through obstacles.

    Solutions:

    1. C++
    2. Python
  3. You are in a book shop which sells n books, and you have x coins. Given the prices and pages of each book, find the maximum number of pages you can buy with the given amount of coins.

    Solutions:

    1. C++
    2. Python
  4. A shop sells n items, each with a weight and a price. You are given the weight of each item and the price of each item. There are g people who want to buy items. Each person can carry own maximum weight of mw. Find the maximum price that can be obtained by selling items to these people.

    Solutions:

    1. C++

    Note:

    To submit this solution visit here.

Resources

  1. Longest Common Subsequence
  2. 0-1 Knapsack
  3. Matrix Chain Multiplication
  4. Coin Change - I (Optimization)
  5. Coin Change - II (Counting)
  • Additional Problems

  1. 0-1 Knapsack variants
  2. DP on strings
  3. CSES Problemset DP (Many variants of DP ranging from easy to hard)

Releases

No releases published

Packages

No packages published