Skip to content

rishithajanjirala3/dynamic-programming-python

Repository files navigation

dynamic-programming-python

💡 Dynamic Programming Practice (Beginner Friendly)

Welcome to this beginner-friendly collection of popular Dynamic Programming (DP) problems in Python!
These examples will help you build strong foundations and prepare for coding interviews or competitive programming.


📚 What is Dynamic Programming?

Dynamic Programming is a method for solving problems by breaking them into smaller overlapping subproblems, solving each once, and storing their results.
This avoids redundant work and speeds up performance compared to brute force recursion.


🧩 Problems Covered

01_knapsack.py — 0/1 Knapsack

Select items with given weights and values to maximize value without exceeding total capacity.

02_lcs.py — Longest Common Subsequence

Find the longest sequence that appears in the same order in both strings.

03_lis.py — Longest Increasing Subsequence

Find the length of the longest increasing subsequence in a list of numbers.

04_edit_distance.py — Edit Distance

Find the minimum operations to convert one word to another (insert, delete, replace).

05_coin_change.py — Minimum Coins

Find the minimum number of coins needed to make up a given amount.

06_partition_subset_sum.py — Partition Equal Subset Sum

Check if the array can be split into two subsets with equal sum.

07_house_robber.py — House Robber

Find the max sum you can rob without stealing from adjacent houses.

08_matrix_chain_mult.py — Matrix Chain Multiplication

Determine the most efficient way to multiply a sequence of matrices.


📂 Folder Structure

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages