educative.io

Crashing the solution

If I try to use the below output, your solution throws a null pointer exception.

int result = MaximizeCapital.findMaximumCapital(new int[] { 2, 1, 5 }, new int[] { 4, 7, 9}, 3, 1);
System.out.println(Maximum capital: + result);

Type your question above this line.

Course: https://www.educative.io/collection/5668639101419520/5671464854355968
Lesson: https://www.educative.io/collection/page/5668639101419520/5671464854355968/4891120511221760

Hi, the output seems to be fine at our end
“Maximum capital: 21
Maximum capital: 8”

Please refresh the lesson and try again.