判斷元素出棧、入棧順序的合法性。如入棧的序列(1,2,3,4,5),出棧序列爲(4,5,3,2,1)

/* Stack.h */ #pragma once #include <stdio.h> #include <string.h> #include <assert.h> typedef char StackDataType; #define MAX_SIZE (100) typedef struct Stack { StackDataType array[MAX_SIZE]
相關文章
相關標籤/搜索