Solved using LCS (Python 3) :)

class Solution:
# @param A : string
# @param B : string
# @param C : string
# @return an integer

def isInterleave(self, A, B, C):
    m=len(A)
    n=len(B)
    o=len(C)
    L=[[None]*(m+1) for i in range(o+1)]
    L1=[[None]*(n+1) for i in range(o+1)]
    
    for i in range(o+1):
        for j in range(m+1):
            if(i==0 or j==0):
                L[i][j]=0
            elif(C[i-1]==A[j-1]):
                    L[i][j]=1+L[i-1][j-1]
            else:
                L[i][j]=max(L[i][j-1],L[i-1][j])
    X=L[o][m]
    
    
    for i in range(o+1):
        for j in range(n+1):
            if(i==0 or j==0):
                L1[i][j]=0
            elif(C[i-1]==B[j-1]):
                    L1[i][j]=1+L1[i-1][j-1]
            else:
                L1[i][j]=max(L1[i][j-1],L1[i-1][j])
    Y=L1[o][n]
    
    if(X==len(A) and Y==len(B)):
        return(1)
        
    else:
        return(0)
Click here to start solving coding interview questions