LeetCode(10)Regular Expression Matching

題目如下: Python代碼: # -*- coding:utf-8 -*- def ismatch(s,p): #先將dp[s+1][p+1]二維數組全置爲False dp = [[False] * (len(s) + 1) for _ in range(len(p)+1)] dp[0][0] = True for i in range(1,len(p)):
相關文章
相關標籤/搜索