What is wrong with this solution of mine?


#1

class Solution:

@param A : string

@param B : string

@return an integer

def isMatch(self, A, B):
s = A
p = B
m = len(s)
n = len§
T = [[0] * (n+1) for _ in range(m+1)]
T[0][0] = 1

for i in range(2,len(T[0])):
    if p[i-1] == "*":
        T[0][i] = T[0][i-2]
        
for i in range(1,len(T)):
    for j in range(1,len(T[0])):
        if s[i-1] == p[j-1] or p[j-1] == '?':
            T[i][j] = T[i-1][j-1]
        elif p[j-1] == "*":
            T[i][j] == T[i][j-2]
            if p[j-2] == '?' or p[j-2] == s[i-1]:
                T[i][j] = T[i][j] or T[i-1][j]
        else:
                T[i][j] = 0

return T[m][n]