def minCut_TLE(self, s):
        if not s:
            return 0

        length = len(s)
        dp = [[1<<32-1 for _ in xrange(length+1)] for _ in xrange(length+1)]
        for i in xrange(length+1):
            try:
                dp[i][i] = 0
                dp[i][i+1] = 0
            except IndexError:
                pass

        for i in xrange(length, -1, -1):
            for k in xrange(i, length+1):
                if self.is_palindrome(s[i:k]):
                    dp[i][k] = 0
                else:
                    dp[i][k] = min(1+dp[i][j]+dp[j][k] for j in xrange(i+1, k))

        return dp[0][length]
L{Request.prePathURL} quotes special characters in the URL segments to
dataset/ETHPy150Open algorhythms/LeetCode/132 Palindrome Partitioning II.py/Solution.minCut_TLE--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/test/test_web.py/RequestTests.test_prePathURLQuoting