From b46c49228497cb440467167bad3123c327bd620f Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Tue, 17 Oct 2017 00:12:32 +0800 Subject: add --- data_structures/chapter_3/stack.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 data_structures/chapter_3/stack.h (limited to 'data_structures/chapter_3/stack.h') diff --git a/data_structures/chapter_3/stack.h b/data_structures/chapter_3/stack.h new file mode 100644 index 0000000..f93c467 --- /dev/null +++ b/data_structures/chapter_3/stack.h @@ -0,0 +1,16 @@ +#ifndef _STACK_H + +struct node; +typedef struct node *ptr_to_node; +typedef ptr_to_node stack; +typedef int elem; + +int is_empty(stack s); +stack create_stack(); +void dispose_stack(stack s); +void make_empty(stack s); +void push(elem x, stack s); +elem top(stack s); +void pop(stack s); + +#endif -- cgit v1.2.3