diff options
Diffstat (limited to 'stack.h')
-rw-r--r-- | stack.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -0,0 +1,19 @@ +#ifndef STACK_H +#define STACK_H + +struct stack +{ + int max_size; + int top; + int *items; +}; + +struct stack *new_stack(int capacity); + +void stack_push(struct stack *pt, int x); + +int stack_peek(struct stack *pt); + +int stack_pop(struct stack *pt); + +#endif
\ No newline at end of file |