implemented min_stack.rb