Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct STACK_EL
- {
- struct node *array;
- struct STACK_EL *prev;
- }STACK_EL;
- STACK_EL *top_stack;
- void stc_push(node *tmp_array)
- {
- STACK_EL *temp=malloc(sizeof(STACK_EL));
- temp->array=tmp_array;
- temp->prev=NULL;
- temp->prev=top_stack;
- top_stack=temp;
- }
- node *stc_pop()
- {
- node *temp;
- temp=top_stack->array;
- STACK_EL *tmp_el;
- tmp_el=top_stack;
- top_stack=top_stack->prev;
- free(tmp_el);
- return temp;
- }
Add Comment
Please, Sign In to add comment