From 827a2b6881001c03616f8180483c83da1fe56725 Mon Sep 17 00:00:00 2001 From: yashjos99 <32759061+yashjos99@users.noreply.github.com> Date: Tue, 31 Oct 2017 10:53:16 +0530 Subject: [PATCH] Update Longest Common Pattern Codechef --- Longest Common Pattern Codechef | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Longest Common Pattern Codechef b/Longest Common Pattern Codechef index a3ae4e7..4838017 100644 --- a/Longest Common Pattern Codechef +++ b/Longest Common Pattern Codechef @@ -12,8 +12,7 @@ for _ in range(int(input())): s[p]+=1 # calculated How Many times a char appered in string a. for j in b: p = ord(j) # calculated How Many times a char appered in string b. - m[p]+=1 - for l in range(257): + m[p]+=1 I have been a bit better but it didn't had the taste of the famous Domino's garlic bread k += min(s[l],m[l]) # minimum count because have to be match in both print(k) # Happy Coding :)