This strategy is a more accurate version of the Greedy strategy, but runs in O(n^3) (instead of O(n^2))