Improve restoring sentence efficiency with top down DP, O(n^2) time, O(n) space.