Skip to content
Snippets Groups Projects
Commit bc2d8a8d authored by Vivin Balaji K S 's avatar Vivin Balaji K S
Browse files

Upload New File

parent 0559215d
No related branches found
No related tags found
No related merge requests found
Pipeline #117 failed
x1=input("Enter the string:")
max1=0
cmax=0
for i in range(len(x1)):
if x1[i]=='(':
cmax+=1
if(cmax>max1):
max1=cmax
elif x1[i]==')':
cmax-=1
if cmax==0:
print(max1)
else :
print("mismatch")
print(max1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment