已知入棧順序,判斷某一序列是否爲其合法出棧序列!

代碼:spa #include<stdio.h>io #include<malloc.h> void Check(int a[],int b[],int n){ int * c; int i=0,j=0,k=0; c=(int *)malloc(sizeof(int)*n); while(i<n){ do{ c[k++]=a[i]; }while(a[i++]!=b[j]); for(int f=
相關文章
相關標籤/搜索