linked list/C Dynamic Array.c
///end of dynamic array
/**
    we use the same array data structure for stack and queue
    The difference is on removing.
    removing a stack is removing the most recent added
    removing a queue is removing the least recent added.
**/
end of dynamic array
we use the same array data structure for stack and queue
The difference is on removing.
removing a stack is removing the most recent added
removing a queue is removing the least recent added.
end of dynamic array we use the same array data structure for stack and queue The difference is on removing . removing a stack is removing the most recent added removing a queue is removing the least recent added .
void push(ArrT data, array *stack){
    shrinkArray(stack);
    growArray(stack);
    stack->arrPtr[stack->currSize] = data;
    stack->currSize += 1;
}
void push ( ArrT data , array * stack ) { shrinkArray ( stack ) ; growArray ( stack ) ; stack -> arrPtr [ stack -> currSize ] = data ; stack -> currSize += 1 ; }
end of dynamic array
we use the same array data structure for stack and queue
The difference is on removing.
end of dynamic array we use the same array data structure for stack and queue The difference is on removing .