void func(char*str)
Stack S;
int i;
for(i=0;i<strlen(str); i++)
if(str[i]=='(')
push(S,'(');
else if(str[i]==')' && !isEmpty(5))
pop(S);
else
printf("Unbalanced");
}
printf("Balanced");
Output?
Answers
Answered by
3
Explanation:
Balanced" (and any subsequent words) was ignored because we limit queries to 32 words
Similar questions