Weighted
Weighted
#include <algorithm>
#include <iostream>
struct Job {
};
return -1;
// (including arr[i])
table[0] = arr[0].profit;
if (l != -1)
inclProf += table[l];
// table[]
delete[] table;
return result;
// Driver program
int main()
{ 1, 2, 50 },
{ 6, 19, 100 },
{ 2, 100, 200 } };
return 0;