Assignment Problems
Learn Assignment Problems (Dynamic Programming, Advanced DSA) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Assigning N Workers to N Tasks, Minimizing Total Cost Each worker has a different cost for each task; assign each worker to exactly one task (and vice versa) to minimize total cost. Same bitmask DP shape as TSP: state = (worker index, mask of tasks already assigned) - since workers are processed in a fixed order, only the current worker index and which tasks remain matter.
More lessons in Dynamic Programming
- Fibonacci (DP)
- Climbing Stairs
- House Robber
- Kadane (DP)
- Grid Paths
- Unique Paths
- Minimum Path Sum
- 0/1 Knapsack
- Unbounded Knapsack
- Bounded Knapsack
- Subset Sum
- Equal Partition
- Target Sum
- Longest Common Subsequence - LCS
- Longest Common Substring
- Edit Distance
- Longest Palindromic Subsequence
- Palindrome Partitioning
- Longest Increasing Subsequence - LIS
- Number of LIS
- Maximum Sum Increasing Subsequence
- Matrix Chain Multiplication
- Burst Balloons
- Optimal BST
- Diameter (Tree DP)
- Maximum Path Sum (Tree DP)
- Tree Independent Set
- Traveling Salesman Problem
- Counting Numbers (Digit DP)
- Digit Constraints