Algorithm 1.1 Pushdown (LIFO) stack (resizing array implementaton)