aboutsummaryrefslogtreecommitdiff
path: root/stack.h
blob: 7f259fe536d8f5f627a592584c2370ed3f9d402d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef STACK_H
#define STACK_H

struct stack
{
	int max_size;
	int top;
	int *items;
};

struct stack *create_stack(int capacity);

void stack_push(struct stack *pt, int x);

int stack_peek(struct stack *pt);

int stack_pop(struct stack *pt);

#endif