You are viewing a single comment's thread. Return to all comments →
Hi,
yes I used an array to keep track of pb, and then selected the max from that array to get the best possible sum.
I do agree the expressions can be re-written to improve efficiency. I skipped that to keep it simple.
Thanks,
peace ..\/,
Seems like cookies are disabled on this browser, please enable them to open this website
The Maximum Subarray
You are viewing a single comment's thread. Return to all comments →
Hi,
yes I used an array to keep track of pb, and then selected the max from that array to get the best possible sum.
I do agree the expressions can be re-written to improve efficiency. I skipped that to keep it simple.
Thanks,
peace ..\/,