Could someone please explain why the output of the given input is 5 and not 3?
k = 1
W = 2
Profits = [1,2,3]
Capital = [1,1,2]
because that's pure profit, it has been mentioned in the question description
Thanks! Silly mistake.
I was stucked in this test case for a while.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.