Stack Implementation challenge - CodeEval