We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This assumes that the empty set is a valid subset for this problem.
It also assumes we're not going to need the input array for anything else, as it butchers that.
Edit: checks for length of 0 & 1 (not checked by problem). Thanks @umanggupta
Max Array Sum
You are viewing a single comment's thread. Return to all comments →
Java solution:
This assumes that the empty set is a valid subset for this problem. It also assumes we're not going to need the input array for anything else, as it butchers that.
Edit: checks for length of 0 & 1 (not checked by problem). Thanks @umanggupta