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";
}
Subscribe to:
Post Comments
(
Atom
)

No comments