hi to everyone...

i will make a program about parenthesis checking and my prof said that we will not be using a stack for this.

will you kindly help me to this..

aside from stack can you help me on what to use.?.

Recommended Answers

All 3 Replies

So use a counter.

should i still use an array for this....?..

counter += 1*(ch=='(') - 1*(ch==')');

It's cryptic because anything simple is the whole answer on a plate.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.