50 Dynamic Programming Programs in C for Freshers

Basic DP Programs

# Program Name Description Resources
1 Fibonacci Series Calculate nth Fibonacci number using DP GeeksforGeeks
2 Factorial Calculation Compute factorial using memoization GeeksforGeeks
3 Climbing Stairs Count ways to reach nth stair GeeksforGeeks
4 Coin Change Count ways to make change for amount GeeksforGeeks
5 Minimum Coin Change Find minimum coins needed for amount GeeksforGeeks
6 0/1 Knapsack Classic knapsack problem solution GeeksforGeeks
7 Unbounded Knapsack Knapsack with item repetitions GeeksforGeeks
8 Longest Common Subsequence Find LCS of two strings GeeksforGeeks
9 Longest Increasing Subsequence Find longest increasing subsequence GeeksforGeeks
10 Matrix Chain Multiplication Optimal matrix multiplication order GeeksforGeeks
11 Edit Distance Minimum operations to convert str1 to str2 GeeksforGeeks
12 Longest Palindromic Subsequence Find longest palindromic subsequence GeeksforGeeks
13 Longest Repeating Subsequence Find longest repeating subsequence GeeksforGeeks
14 Shortest Common Supersequence Find shortest common supersequence GeeksforGeeks
15 Wildcard Pattern Matching Match pattern with wildcards GeeksforGeeks
16 Maximum Subarray Sum Kadane's algorithm implementation GeeksforGeeks
17 Maximum Product Subarray Find subarray with maximum product GeeksforGeeks
18 Rod Cutting Maximize profit from rod cutting GeeksforGeeks
19 Egg Dropping Find critical floor with minimum trials GeeksforGeeks
20 House Robber Maximize robbery without alerting GeeksforGeeks
21 Partition Problem Check if array can be partitioned equally GeeksforGeeks
22 Word Break Check if string can be segmented GeeksforGeeks
23 Palindrome Partitioning Minimum cuts for palindrome partitions GeeksforGeeks
24 Box Stacking Maximum height box stacking GeeksforGeeks
25 Weighted Job Scheduling Maximize profit from non-overlapping jobs GeeksforGeeks
26 Diameter of Binary Tree Find longest path between leaves GeeksforGeeks
27 Maximum Path Sum Find maximum path sum in binary tree GeeksforGeeks
28 Unique BST Count Count unique BSTs with n nodes GeeksforGeeks
29 Maximum Independent Set Find maximum independent set in tree GeeksforGeeks
30 Tree Matching Maximum matching in tree GeeksforGeeks
31 Shortest Path (Bellman-Ford) Single source shortest path with DP GeeksforGeeks
32 Floyd Warshall All pairs shortest paths GeeksforGeeks
33 Travelling Salesman Classic TSP solution with DP GeeksforGeeks
34 Longest Path in DAG Find longest path in directed acyclic graph GeeksforGeeks
35 Vertex Cover Minimum vertex cover for tree GeeksforGeeks
36 DP with Bitmasking DP problems using bitmasking GeeksforGeeks
37 DP with Segment Trees Optimizing DP with segment trees GeeksforGeeks
38 Convex Hull Optimization Advanced DP optimization technique GeeksforGeeks
39 Knuth's Optimization Optimization for certain DP problems GeeksforGeeks
40 Divide and Conquer Optimization Optimizing DP recurrence relations GeeksforGeeks
41 Probability DP DP problems involving probability GeeksforGeeks
42 Digit DP DP for digit-related problems GeeksforGeeks
43 DP on Broken Profile DP for grid-based problems GeeksforGeeks
44 DP with BFS Combining DP with BFS GeeksforGeeks
45 DP with Meet-in-the-Middle Optimizing exponential problems GeeksforGeeks
46 DP with Sliding Window Optimizing DP with sliding window GeeksforGeeks
47 DP with Prefix Sums Optimizing DP with prefix sums GeeksforGeeks
48 DP with Binary Search Combining DP with binary search GeeksforGeeks
49 DP with Two Pointers Optimizing DP with two pointers GeeksforGeeks
50 DP with Game Theory DP for game theory problems GeeksforGeeks

30 Common DP Techniques in C

# Technique Name Description Resources
1 Memoization Top-down approach with caching GeeksforGeeks
2 Tabulation Bottom-up approach with table GeeksforGeeks
3 State Transition Defining state transitions GeeksforGeeks
4 Space Optimization Reducing space complexity GeeksforGeeks
5 Prefix/Suffix DP DP based on prefixes/suffixes GeeksforGeeks
6 Range DP DP over ranges/intervals GeeksforGeeks
7 Bitmask DP DP with bitmask state representation GeeksforGeeks
8 Digit DP DP for digit-related counting GeeksforGeeks
9 DP on Trees DP techniques for tree structures GeeksforGeeks
10 DP on Graphs DP techniques for graph problems GeeksforGeeks
11 DP with Binary Search Combining DP with binary search GeeksforGeeks
12 DP with Two Pointers Optimizing DP with two pointers GeeksforGeeks
13 DP with Sliding Window Optimizing DP with sliding window GeeksforGeeks
14 DP with Meet-in-the-Middle Splitting problem into halves GeeksforGeeks
15 DP with Game Theory DP for game theory problems GeeksforGeeks
16 DP with Probability DP involving probability GeeksforGeeks
17 DP with Geometry DP for geometric problems GeeksforGeeks
18 DP with Number Theory DP for number theory problems GeeksforGeeks
19 DP with Strings DP for string manipulation GeeksforGeeks
20 DP with Arrays DP for array manipulation GeeksforGeeks
21 DP with Matrices DP for matrix problems GeeksforGeeks
22 DP with Combinatorics DP for counting problems GeeksforGeeks
23 DP with Backtracking Combining DP with backtracking GeeksforGeeks
24 DP with Greedy Combining DP with greedy GeeksforGeeks
25 DP with Divide and Conquer Optimizing DP with D&C GeeksforGeeks
26 DP with Convex Hull Advanced optimization technique GeeksforGeeks
27 DP with Knuth's Optimization Optimization for certain DP problems GeeksforGeeks
28 DP with Aliens Trick Lagrange multiplier optimization GeeksforGeeks
29 DP with Persistent Structures Using persistent data structures GeeksforGeeks
30 DP with Heavy-Light Decomposition Advanced tree DP technique GeeksforGeeks

Related Resources