stack using array with resizing capability and iterator implementation