Name: Anonymous 2012-04-05 16:27
This is in C.
Say I give you a sequence of numbers, for example 1 2 5 -2 5 2 -4 8. Each number is a reward. Pick the sequence of numbers that will maximize your reward, with minimum of n spaces between numbers, and maximum m spaces between numbers. The minimum doesn't apply at the beginning and end of your sequence. So for the above sequence, if n=1 and m=3, the correct answer would be 1 _ 5 _ 5 _ _ 8
Say I give you a sequence of numbers, for example 1 2 5 -2 5 2 -4 8. Each number is a reward. Pick the sequence of numbers that will maximize your reward, with minimum of n spaces between numbers, and maximum m spaces between numbers. The minimum doesn't apply at the beginning and end of your sequence. So for the above sequence, if n=1 and m=3, the correct answer would be 1 _ 5 _ 5 _ _ 8