The difference between stacks and queues
The representation of stacks and queues.
Problem 0-0
here is a string that contains three types of bracket symbols(). Please write a program to determine whether the brackets in the string are properly matched according to the pairing principle (please refer to the example below).
correct
()
()(())
((())())
incorrect
)(
())
(()
()())
Problem 0-1
There is a string that contains three types of bracket symbols() [] . Please write a program to determine whether the brackets in the string are properly matched according to the pairing principle (please refer to the example below).
correct