From c3cf173d30db6cff2561696a46abfcdef538bf71 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Sat, 2 Dec 2017 06:03:52 +0800 Subject: category --- Computer_Science/data_structures/chapter_3/stack_array.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Computer_Science/data_structures/chapter_3/stack_array.h (limited to 'Computer_Science/data_structures/chapter_3/stack_array.h') diff --git a/Computer_Science/data_structures/chapter_3/stack_array.h b/Computer_Science/data_structures/chapter_3/stack_array.h new file mode 100644 index 0000000..088b0cc --- /dev/null +++ b/Computer_Science/data_structures/chapter_3/stack_array.h @@ -0,0 +1,16 @@ +#ifndef _STACK_H + +struct stack_record; +typedef struct stack_record *stack; +typedef int elem; + +int is_empty(stack s); +int is_full(stack s); +stack create_stack(int max_elements); +void dispose_stack(stack s); +void push(elem x, stack s); +elem top(stack s); +void pop(stack s); +elem top_and_pop(stack s); + +#endif -- cgit v1.2.3