堆疊與佇列的差異

The difference between stacks and queues

堆疊與佇列的表示法

The representation of stacks and queues.

堆疊的操作和範例 (python)

佇列操作和範例(python)

QUESTION

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

Problem 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