aboutsummaryrefslogtreecommitdiff
path: root/data_structures/chapter_3/stack_array.h
blob: 088b0cce31cf8f9431de20aa027e0f8daeaa186c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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