Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Longest Common Pattern Codechef
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ for _ in range(int(input())):
b = str(input())
for i in a:
p = ord(i)
s[p]+=1 # calculated How Many times a char appered in string a.
s[p]+=1 # calculated How Many times a char appeared in string a.
for j in b:
p = ord(j) # calculated How Many times a char appered in string b.
p = ord(j) # calculated How Many times a char appeared in string b.
m[p]+=1
for l in range(257):
k += min(s[l],m[l]) # minimum count because have to be match in both
Expand Down