stack with dynamic arrays
stack implementation on linked-lists