
Bellman-Ford: relaxing all edges of doubt...

Bellman-Ford: relaxing all edges of doubt...
Make locally optimal choices for globally optimal solutions
Given n activities with start and end times, select the maximum number of non-overlapping activities.
Given n items with weights and values, and a knapsack capacity W, maximize the total value.
Given character frequencies, compute the minimum total cost of a prefix-free binary encoding.
Given an array where each element represents the maximum jump length from that position, determine if you can reach the last index starting from index 0.
There are n gas stations in a circle. Station i has gas[i] fuel and costs cost[i] fuel to reach station i+1.
Each child has a greed factor g[i] (minimum cookie size they accept). Each cookie has size s[j].
Master the fundamental pattern. Each problem teaches you when and how to apply this technique.