All problems‎ > ‎

Integer stack

Develop a class implementing the classic Stack datastructure containing integer values. That is, it should support the following operations:
  1. Push(value) - adds a value to top of the stack
  2. value Pop() - removes the top element of the stack and returns that value
  3. int Count() - returns the current number of elements contained in the stack
Comment by Jeff: Demonstrates technique well but solution is a bit too trivial, which can shortchange the value of TDD