review dynamic program problem Segment String Issue #3