summaryrefslogtreecommitdiff
path: root/progs/a939.py
blob: 74c34636605dbedf5868b50c0b640a6b0502f4c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
def is_Sub_Array(A,B,n,m): 
    i = 0; j = 0; 
    while (i < n and j < m):  
        if (A[i] == B[j]): 
            i += 1; 
            j += 1; 
            if (j == m): 
                return True;  
        else: 
            i = i - j + 1; 
            j = 0;       
    return False;