All shows runtime error , you can see my last submitted code
TestCases not passed
Hey
Can you post the code here?
import math def func(arr,i,s): if i==len(arr): freq=[0]*26 for i in range(len(s)): if freq[ord(s[i])-ord(‘a’)]==1: return 0 else: freq[ord(s[i])-ord(‘a’)]+=1 return len(s) op1=-math.inf op2=-math.inf if len(arr[i]+s)<=26: op1=func(arr,i+1,arr[i]+s) op2=func(arr,i+1,s) return max(op1,op2) n=int(input()) arr=[] s="" while n!=0: arr.append(input()) n=n-1 print(func(arr,0,s))
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.