求助一道FB的高频题non-overlap jobs# JobHunting - 待字闺中
y*8
1 楼
先谢谢各位了!
题目是:Given a set of n jobs with [start time, end time, cost] find a
subset so that no 2 jobs overlap and the cost is maximum.
brute force 肯定是不行的了。我知道一个O(N^2)的解答,请问有更好的答案吗?谢谢
了!
题目是:Given a set of n jobs with [start time, end time, cost] find a
subset so that no 2 jobs overlap and the cost is maximum.
brute force 肯定是不行的了。我知道一个O(N^2)的解答,请问有更好的答案吗?谢谢
了!