diff options
| author | Johnny Richard <johnny@johnnyrichard.com> | 2025-04-11 01:15:01 +0200 |
|---|---|---|
| committer | Johnny Richard <johnny@johnnyrichard.com> | 2025-04-14 23:11:22 +0200 |
| commit | e7f69c8fbbbcbddde84933b2becd91e787d1ac63 (patch) | |
| tree | 16cd17da17133494dd06aab614724e76b059d4ad /src/stack.h | |
Intial commit
Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
Diffstat (limited to 'src/stack.h')
| -rw-r--r-- | src/stack.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/stack.h b/src/stack.h new file mode 100644 index 0000000..30722ee --- /dev/null +++ b/src/stack.h @@ -0,0 +1,15 @@ +#ifndef STACK_H +#define STACK_H +#include <stdlib.h> + +typedef struct stack +{ + size_t capacity; + size_t size; + int *data; +} stack_t; + +void stack_push(stack_t *stack, int value); +int stack_pop(stack_t *stack); + +#endif /* STACK_H */ |
