()((())((())
Is it correct sequence?
I need just a counter.
foreach char in string {
If next bracket is “(” then inc(counter);
If next bracket is “)” then dec(counter);
If counter < 0 then showmessage(“Error”);
}
()((())((())
Is it correct sequence?
I need just a counter.
foreach char in string {
If next bracket is “(” then inc(counter);
If next bracket is “)” then dec(counter);
If counter < 0 then showmessage(“Error”);
}