Problem solving with programming: Bracket matching problem
Stack is one of the most widely used data structure. In this post we will learn how to use the stack container (data structure) provided by C++ STL with an example.Let us consider the following problem. We have a string which contains only '(' and ')' characters. We have to write a program to check if it forms a valid expression.
For example the string "(()())" is a valid expression where as "(()()" and "())" are not.
Read full article from Problem solving with programming: Bracket matching problem
No comments:
Post a Comment