/*Constructor for the Stack Data Structure*/ struct stack * newStack(){ struct stack *s = malloc(sizeof(struct stack)); s->front = newStackNode(); s->rear = newStackNode(); s->size = 0; return s; }
void push(stack* st ,node* newnode) { struct stacknode* temp = newStackNode(newnode) ; temp->next = st->topnode ; st->topnode = temp ; st->sz += 1 ; }