Comitted MaxSequenceSum problem solution