stack implementation by linkedlist

This commit is contained in:
dang hai
2019-07-01 18:06:21 -07:00
parent 5ea87473d9
commit 2e58bc2207
5 changed files with 132 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
#ifndef __STACK__
#define __STACK__
#define T Stack_T
typedef struct T *T;
extern T Stack_init (void);
extern int Stack_size (T stack);
extern int Stack_empty (T stack);
extern void Stack_push (T stack, void *val);
extern void *Stack_pop (T stack);
extern void Stack_print (T stack);
#undef T
#endif