Atlassian interview question

Implement a stack in Java

Interview Answer

Anonymous

5 Nov 2015

Just use an array and an integer to keep track of the current index in the 'stack'. They don't want the stack to be able to grow and shrink dynamically (so don't use a linked list) they just want it to be an array that works as a stack.