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 a singleton class c++?
What is purpose of new operator?
What is ios :: in in c++?
Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be
What is abstract class in c++?
How would you use the functions randomize() and random()?
What is tellg () in c++?
Do vectors start at 0?
Define basic type of variable used for a different condition in C++?
What is the difference between the compiler and the preprocessor?
Why is polymorphism useful?
Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?
What is time h in c++?
Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;
What is the difference between an enumeration and a set of pre-processor # defines?