Python3 Easy, O(n*m) Time Solution


#1
def uniquePathsWithObstacles(self, A):
    dp = [[0]*len(A[0]) for _ in range(len(A))]
    if A[0][0]==1:
        return 0
    for i in range(len(A)):
        for j in range(len(A[0])):
            if i==0 and j==0:
                dp[i][j]=1
            elif i==0 and A[i][j]!=1:
                dp[i][j] = dp[i][j-1]
            elif j==0 and A[i][j]!=1:
                dp[i][j] = dp[i-1][j]
            elif A[i][j]!=1:
                dp[i][j] = dp[i-1][j]+dp[i][j-1]
    
    return dp[len(A)-1][len(A[0])-1]