Functional Programming in Java, Second Edition: p 148 "An optimization problem" & "Plain-Vanilla Recursion" problems

We can assume the given values are profit instead of revenue. The exponential time complexity also comes from the worst case scenario.