Skip to content

rrajudepository/Dynamic-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language Topic Level Type Stars

📊 Dynamic Programming – Algorithms & Problem Solving Repository

A curated collection of **Dynamic Programming (DP)** problems, techniques, and implementations in C++. This repo is aimed at learners who want to strengthen their DP understanding for contests, interviews, and algorithmic challenges.


📌 Overview

  • Cover classical DP problems and patterns
  • Include multiple variants and optimizations (memoization, tabulation, space optimization)
  • Provide clear, well-commented C++ code
  • Use problem statements and test cases to practice
  • Structure content in a logical progression from simple → complex

🧠 Topics Covered

  • Basic DP (Fibonacci, Climbing Stairs, etc.)
  • 0/1 Knapsack and Unbounded Knapsack
  • Sequence DP: LIS, LCS, Edit Distance, etc.
  • Interval DP, Partition DP, Matrix Chain Multiplication
  • DP with State Compression (Bitmask)
  • Tree DP and Graph + DP Hybrid Techniques
  • Optimization Techniques:
    • Space optimization
    • Rolling arrays
    • Transition improvements

👥 Who This Is For

  • 🟢 Learners who understand basic algorithms and want to dive deeper
  • 🎯 Students preparing for coding interviews (product & service companies)
  • 🧠 Competitive programmers aiming to master DP patterns for contests
  • 📝 Anyone looking for clean, reusable code & well-structured solutions

🤝 Contribution

Contributions and improvements are always welcome! 🙌
You can:

  • ✍️ Add new DP problems and their variations
  • Provide optimized solutions or multiple approaches to existing problems
  • 📝 Add detailed comments, edge cases, and test cases
  • 🧭 Improve folder structure or add roadmaps / topic-wise checklists
  • 🧠 Suggest new problem patterns or techniques to cover

How to Contribute

  1. Fork the repository
  2. Make your changes in your branch
  3. Open a Pull Request (PR) describing what you’ve added or changed

Contributions of all levels — from typo fixes to new topics — are welcome!


🧭 Folder Structure

Dynamic-Programming/
├── 01_Basics_DP/
│   ├── fibonacci_dp.cpp
│   ├── climbing_stairs.cpp
│   └── ...
│
├── 02_Knapsack_Variants/
│   ├── 0_1_knapsack.cpp
│   ├── unbounded_knapsack.cpp
│   └── ...
│
├── 03_DP_on_Sequences/
│   ├── longest_increasing_subsequence.cpp
│   ├── longest_common_subsequence.cpp
│   └── edit_distance.cpp
│
├── 04_DP_on_Intervals_And_Subarrays/
│   ├── matrix_chain_multiplication.cpp
│   ├── partition_dp.cpp
│   └── ...
│
├── 05_DPGraphs_States/
│   ├── bitmask_dp_states.cpp
│   ├── dp_on_trees.cpp
│   └── ...
│
└── README.md

About

DP from Basic to Advance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published