⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ql_hw.cpp

📁 数据结构中所有算法的实现
💻 CPP
字号:
#include "d:\cpp\ql.cpp"
#include "d:\cpp\ss.cpp"
Bool huiwen(char con[]){
  SqStack S;
  LinkQueue Q;
  ElemType e1,e2;
  int i;
  i=0;
  InitStack(S);
  InitQueue(Q);
  while(con[i]!='\0'){
    Push(S,con[i]);
    EnQueue(Q,con[i]);
    i++;
  }//while
  while(DeQueue(Q,e1)){
    Pop(S,e2);
    if(e1!=e2)break;
  }//while
  if(!QueueEmpty(Q)) return FALSE;
  else return TRUE;
}
main(){
  char con[]="asfdsbafdsadssa";
  printf("zi fu chuan %s ",con);
  if(huiwen(con)==TRUE) printf("YES\n");
  else printf("NO\n");
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -