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
What is implicit pointer in c++?
Do you know what are pure virtual functions?
How can you say that a template is better than a base class?
How do I use turbo c++?
Why is c++ considered difficult?
How can you quickly find the number of elements stored in a static array?
Explain what is oop?
Can we inherit constructor in c++?
What is buffering in c++?
Differentiate between a constructor and a destructor in c++.
What is the use of class in c++?
When we use Abstract Class and when we use Interface?where we will implement in real time?
Explain the properties and principles of oop.
Can a program run without main function?
How do you flush a buffer in c++?