📄 3.19.txt
字号:
Status MatchCheck(SqList exp)
/* 顺序表exp表示表达式; */
/* 若exp中的括号配对,则返回TRUE,否则返回FALSE */
{
int i;
Stack s;
ElemType c,d;
InitStack(s);
for(i=0;i<exp.length;i++){
c=exp.elem[i];
if(c=='('||c=='['||c=='{')
Push(s,c);
else if(c==')'){
if(!Pop(s,d)||d!='(') return FALSE;
}
else if(c==']'){
if(!Pop(s,d)||d!='[') return FALSE;
}
else if(c=='}'){
if(!Pop(s,d)||d!='{') return FALSE;
}
}
if(StackEmpty(s)) return TRUE;
else return FALSE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -