1) Bricklayer 2) Roofer 3) Architectural drafter 4) landscape architect
I recommend between $5,500 and $12,500 each year.
Answer:
OPT[i] : segment that end in i with largest amount N
OPT[0] = 0
OPT[i] = max{OPT[i-1] + ai, 0}
for i from 1 to n
if (OPT[i] > max) {
max = OPT[i]
max_i = i
}
count = 0
for i from max_i to 1
count +=a[i]
if (count== max) {
start = i ;
break;
}
Opinion wise, I disagree with punishment.