rmq/stack.c
void push(stack *stk, double key)
{
    if(stk != NULL)
    {
        node *nd = newnd(key);
        if(nd != NULL)
        {
            if(stkepty(stk))
                stk->top = nd;
            else
            {
                nd->nxt = stk->top;
                stk->top = nd;
            }
        }
    }
}
//add a key to the stack
add a key to the stack
add a key to the stack
void push(stack *stk, double key)
{
    if(stk != NULL)
    {
        node *nd = newnd(key);
        if(nd != NULL)
        {
            if(stkepty(stk))
                stk->top = nd;
            else
            {
                nd->nxt = stk->top;
                stk->top = nd;
            }
        }
    }
}
void push ( stack * stk , double key ) { if ( stk != NULL ) { node * nd = newnd ( key ) ; if ( nd != NULL ) { if ( stkepty ( stk ) ) stk -> top = nd ; else { nd -> nxt = stk -> top ; stk -> top = nd ; } } } }
add a key to the stack
add a key to the stack