Header Ads

Header ADS
Question: Check validity of an arithmetic expression using stack data structure in any of your preferred programming language [c or c++] #include #include using namespace std; bool Balanced(string str) { stack s; char c; for (int i=0; i>str; if (Balanced(str)) cout << "Balanced"; else cout << "Not Balanced"; }

No comments

Powered by Blogger.