📄 3.31.txt
字号:
Status Palindrome(char *word)
/* 利用栈和队列判定字符序列word是否是回文 */
{
int i,totaln;
char temp1,temp2;
Stack s;
Queue q;
InitStack(s);
InitQueue(q);
for(i=0;word[i]!='@';i++){
Push(s,word[i]);
EnQueue(q,word[i]);
}
totaln=i;
for(i=0;i<totaln;i++){
Pop(s,temp1);
DeQueue(q,temp2);
if(temp1!=temp2) break;
}
return i==totaln;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -