Answer Posted / hrpynux@gmail.com
If the current character is a starting bracket ('(' or '{' or '[') then push it to stack. If the current character is a closing bracket (')' or '}' or ']') then pop from stack and if the popped character is the matching starting bracket then fine else brackets are not balanced.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Where and why do I have to put the "template" and "typename" keywords?
Can I create my own functions in c++?
C is to C++ as 1 is to a) What the heck b) 2 c) 10
Should I learn c++ c?
How const int *ourpointer differs from int const *ourpointer?
How much do c++ programmers make?
What is the use of data hiding?
Why c++ is the best language?
What is setiosflags c++?
What are features of c++?
What gives the current position of the put pointer?
Is c++ still in demand?
What are destructors?
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].
What is meant by entry controlled loop?