Commit 433e1b98 authored by Charles Gerard's avatar Charles Gerard
Browse files

tweraking

parent 14f77226
......@@ -53,31 +53,36 @@ int main(int argc, const char* argv[]) {
if (holder.back() == '(') {
holder.pop_back();
} else {
//holder.push_back(c);
isBalanced = false;
break;
holder.push_back(c);
//isBalanced = false;
//break;
}
}
if (c == ']') {
if (holder.back() == '[') {
holder.pop_back();
} else {
//holder.push_back(c);
isBalanced = false;
break;
holder.push_back(c);
//isBalanced = false;
//break;
}
}
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;
}
ifs.close();
if (isBalanced) {
......
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