minimum path sum updated (from end to start)