classSolution:""" @param A : A string includes Upper Case letters @param B : A string includes Upper Case letters @return : if string A contains all of the characters in B return True else return False """defcompareStrings(self,A,B):# write your code here# an array to carry all characterscharacters=[0]*256foriinrange(len(A)):index=ord(A[i])-ord('A')characters[index]+=1foriinrange(len(B)):index=ord(B[i])-ord('A')ifcharacters[index]==0:returnFalsecharacters[index]-=1returnTrue