Uses an array that has been modified to act as if it were a stack.