word break problem memoized