Commit 02e3185f authored by Charles Gerard's avatar Charles Gerard
Browse files

m

parent 921011df
......@@ -25,7 +25,6 @@ int main() {
}
}
if (c == '(') {
cout << "here i am" << endl;
holder.push_back(c);
} else if (c == '[') {
holder.push_back(c);
......@@ -35,32 +34,31 @@ int main() {
if (holder.back() == '(') {
holder.pop_back();
} else {
holder.push_back(c);
//isBalanced = false;
//break;
//holder.push_back(c);
isBalanced = false;
break;
}
} else if (c == ']') {
if (holder.back() == '[') {
holder.pop_back();
} else {
holder.push_back(c);
//isBalanced = false;
//break;
//holder.push_back(c);
isBalanced = false;
break;
}
} else if (c == '}') {
if (holder.back() == '{') {
holder.pop_back();
} else {
holder.push_back(c);
//isBalanced = false;
//break;
//holder.push_back(c);
isBalanced = false;
break;
}
}
}
if (!holder.empty()) {
isBalanced = false;
cout << "what can i say it wasnt empty" << endl;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment