Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Check for Balanced Parentheses using Stack?



Check for Balanced Parentheses using Stack?..

Answer / 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

More C++ General Interview Questions

What is the difference between const and constexpr?

4 Answers  


Why cstdlib is used in c++?

0 Answers  


How many keywords are used in c++?

0 Answers  


Why is c++ is better than c?

0 Answers  


What are stacks? Give an example where they are useful.

0 Answers  


What is the array and initializing arrays in c++?

0 Answers  


What is difference c and c++?

1 Answers  


How would you use the functions memcpy(), memset(), memmove()?

0 Answers  


What is encapsulation in c++?

1 Answers  


What is helper in c++?

0 Answers  


What are references in c++? What is a local reference?

0 Answers  


What is a static element?

0 Answers  


Categories